Skip to content

Instantly share code, notes, and snippets.

@tadzik
Created November 19, 2011 18:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tadzik/1379175 to your computer and use it in GitHub Desktop.
Save tadzik/1379175 to your computer and use it in GitHub Desktop.
Testing modules on nom
#!/usr/bin/env perl6
use Panda;
use Shell::Command;
my $panda;
{
my $pandadir = %*ENV<HOME> ~ '/.panda';
mkpath $pandadir unless $pandadir.IO ~~ :d;
my $projectsfile = "$pandadir/projects.json";
unless $projectsfile.IO ~~ :f {
shell "wget http://feather.perl6.nl:3000/list -O $projectsfile";
}
$panda = Panda.new(
srcdir => "$pandadir/src",
destdir => %*ENV<HOME> ~ '/.perl6',
statefile => "$pandadir/state",
projectsfile => "$pandadir/projects.json"
);
}
for $panda.ecosystem.project-list -> $p {
say "[MASSTEST] => Trying '$p'";
my $x = $panda.ecosystem.get-project($p);
if $panda.ecosystem.project-get-state($x) ne 'absent' {
say "[MASSTEST] => Looks like '$p' got installed already";
} else {
try {
$panda.resolve($p);
}
if defined $! {
say "[MASSTEST] => Installing '$p' has failed: '$!'";
} else {
say "[MASSTEST] => Seems that '$p' works fine on nom";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment