Skip to content
Permalink
Browse files

Ensure other test files don't interfere with reproducible-builds.t

NativeCall's tests may want to precompile NativeCall, too and run in parallel
so the repository's state may change. Fix by keeping a lock on the precomp
store.
  • Loading branch information...
niner committed May 5, 2019
1 parent cd11b50 commit b0dd44b006dc44da5695b28c53be52a5772f08a4
Showing with 4 additions and 2 deletions.
  1. +4 −2 t/02-rakudo/reproducible-builds.t
@@ -1,4 +1,8 @@
use lib 'lib';
BEGIN my $compiler-id = CompUnit::PrecompilationId.new-without-check($*PERL.compiler.id);
BEGIN my $id = CompUnit::PrecompilationId.new('000');
BEGIN my $dest = $*REPO.precomp-store.destination($compiler-id, $id); # not really used
END { $*REPO.precomp-store.unlock }
use Test;
use NativeCall; # precompile dependencies

@@ -8,8 +12,6 @@ my $store = CompUnit::PrecompilationStore::File.new(
my $precompilation-repository = CompUnit::PrecompilationRepository::Default.new(:$store);
my @checksums;
my @units;
my $compiler-id = CompUnit::PrecompilationId.new-without-check($*PERL.compiler.id);
my $id = CompUnit::PrecompilationId.new('000');
for ^2 -> $run {
$precompilation-repository.precompile(
'lib/NativeCall.pm6'.IO,

0 comments on commit b0dd44b

Please sign in to comment.
You can’t perform that action at this time.