Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix random test failures during parallel test runs
Since commit 2576145 we copy
p5helper.so to /tmp on load. When several processes try to do that at
the same time, some may end up loading a half written library leading to
all kinds of interesting and very confusing error messages.

Fix for now by prepending the process id to the file name. Real fix will
be to store files by their original name in the
CompUnitRepo::Local::Installation
  • Loading branch information
niner committed Apr 17, 2015
1 parent 189699f commit 4ebc31e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Inline/Perl5.pm6
Expand Up @@ -25,8 +25,8 @@ sub native(Sub $sub) {
# This is required because CompUnitRepo::Local::Installation stores the file
# with a different filename (a number with no extension) that NativeCall doesn't
# know how to load. We do this copy to fix the filename.
$tmp.IO.copy($*SPEC.tmpdir ~ '/' ~ $so);
$path = $*SPEC.tmpdir ~ '/' ~ $so;
$path = $*SPEC.tmpdir ~ '/' ~ $*PID ~ '-' ~ $so;
$tmp.IO.copy($path);
}
}
}
Expand Down

0 comments on commit 4ebc31e

Please sign in to comment.