Skip to content
Browse files

Test reproducibility of precompilation

Compile NativeCall.pm6 twice and check that it produces the exact same bytecode
as signified by the precomp file's checksum. NativeCall is a good candidate for
this as it's a somewhat complex and good sized module with a couple of
dependencies. This should cover a nice range of reproducibility issues.
  • Loading branch information...
niner committed May 2, 2019
1 parent 8ec2c43 commit 532d19fc4e18bc08f7660d430d1c696bcbbe4b9d
Showing with 27 additions and 0 deletions.
  1. +27 −0 t/02-rakudo/reproducible-builds.t
@@ -0,0 +1,27 @@
use Test;

my $store =
:prefix($*TMPDIR.child("rakudo-precomp" ~ (^2**128).pick.base(36)))
my $precompilation-repository =$store);
my @checksums;
my $compiler-id =$*;
my $id ='000');
for ^2 -> $run {
@checksums.push: $store.load-unit($compiler-id, $id).checksum;

is @checksums[1], @checksums[0], 'Both precompilation runs resulted in the same checksum';


# vim: ft=perl6

0 comments on commit 532d19f

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