Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 75131c9c52
Fetching contributors…

Cannot retrieve contributors at this time

executable file 72 lines (60 sloc) 1.824 kb
#!/usr/bin/env perl6
use Panda;
use Shell::Command;
use JSON::Tiny;
multi gen-result($) {
{ prereq => True, build => True, test => True }
}
multi gen-result(X::Panda $ex) {
my %res = do given $ex.stage {
when 'resolve' | 'fetch' {
{ prereq => False }
}
when 'build' {
{ prereq => True, build => False }
}
when 'test' {
{ prereq => True, build => True, test => False }
}
};
%res<description> = $ex.description;
return %res
}
sub MAIN ($projectsfile) {
try mkdir "installlib";
%*ENV<PERL6LIB> = "{cwd}/installlib/lib:" ~ (%*ENV<PERL6LIB> // '');
my $panda = Panda.new(
srcdir => "{cwd}/masstest/pandadir/src",
destdir => "{cwd}/installlib",
statefile => "{cwd}/masstest/pandadir/state",
projectsfile => $projectsfile,
);
my %log;
my $start = time;
for $panda.ecosystem.project-list -> $p {
my $x = $panda.ecosystem.get-project($p);
# don't waste time if it has already been installed once
if $panda.ecosystem.project-get-state($x) ne 'absent' {
%log{$p} = gen-result(Any);
next;
}
try $panda.resolve($p);
%log{$p} = gen-result($! // 'chocolate cake');
}
my $end = time;
%log<_statistics> = {
runtime => $end - $start,
compiler => $*PERL<compiler><name>,
version => $*PERL<compiler><ver>,
datetime => DateTime.new(now).Str
}
shell 'rm -rf masstest/';
shell 'rm -rf installlib/';
given open('results.json', :w) {
.say: to-json %log;
.close;
}
say '';
say 'Smoke test results have been written to results.json';
say '====================================================';
}
Jump to Line
Something went wrong with that request. Please try again.