X-Git-Url: http://git.ieval.ro/?p=gruntmaster-daemon.git;a=blobdiff_plain;f=t%2F01-jobs.t;h=78dc416cb5a7b4acd20e8f8002ab8fbe990c563f;hp=742a79780f603521bc23bd9556534065157ca4b7;hb=fd807ac9dddfd831fc6f963fd5f6613b2e78c944;hpb=fe29da7c36676daeee95875a30bd2e382d86edbe diff --git a/t/01-jobs.t b/t/01-jobs.t index 742a797..78dc416 100644 --- a/t/01-jobs.t +++ b/t/01-jobs.t @@ -59,7 +59,7 @@ my @problems = exists $ENV{TEST_PROBLEMS} ? map {"t/problems/$_"} split ' ', $EN plan tests => 3 * sum map { my @temp = <$_/tests/*>; scalar @temp } @problems; note "Problems to be tested: " . join ', ', @problems; -my $tempdir = tempdir "gruntmaster-daemon-testingXXXX", TMPDIR => 1, CLEANUP => 1; +my $tempdir = tempdir "gruntmasterd-testingXXXX", TMPDIR => 1, CLEANUP => 1; chmod 0777, $tempdir; my $job = 0; @@ -75,17 +75,20 @@ for my $problem (@problems) { } TODO: { - local $TODO = $pbmeta->{todo} if exists $pbmeta->{todo}; note "Now testing problem $pbmeta->{name} ($pbmeta->{description})"; for my $source (<$problem/tests/*>) { SKIP: { my $meta = LoadFile "$source/meta.yml"; - my $compiler = COMPILER->{$meta->{files}{prog}{format}}; - skip "$compiler not found in path", 3 unless $ENV{GRUNTMASTER_VM} || which $compiler; - local $TODO = $meta->{todo} if exists $meta->{todo}; - $meta->{files}{prog}{content} = read_file "$source/$meta->{files}{prog}{name}"; + if ($meta->{files}{prog}) { + my $format = $meta->{files}{prog}{format}; + my $compiler = COMPILER->{$format}; + skip "$compiler not found in path", 3 unless $ENV{GRUNTMASTER_VM} || which $compiler; + skip "$format requires multiple processes. Set GRUNTMASTER_KILL_USER and GRUNTMASTER_SUDO to allow multiple processes.", 3 if !$ENV{GRUNTMASTER_KILL_USER} && $format eq 'JAVA' || $format eq 'GOLANG' || $format eq 'GCCGO'; + $meta->{files}{prog}{content} = read_file "$source/$meta->{files}{prog}{name}"; + } $meta = merge $meta, $pbmeta; + local $TODO = $meta->{todo} if exists $meta->{todo}; note "Running $meta->{test_name} ($meta->{test_description})..."; my $savedcwd = getcwd; chdir $tempdir;