Subject: | Tests fail when run in parallel |
I just got;
# Failed test 'log file has multiline intended format - reason : could not open log file './file.log''
# at t/068MultilineIndented.t line 48.
# Looks like you failed 1 test of 1.
t/068MultilineIndented.t ..
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
...when running tests with HARNESS_OPTIONS=j9 set. Looks like multiple tests are reusing a common file or directory, so they stomp all over each other. Instead, use a new temp directory for each test, via File::Temp or Test::TempDir::Tiny.