Skip JAVA/GOLANG/GCCGO if sudo is not used and improve TODO handling
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 8 Feb 2015 14:43:15 +0000 (16:43 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 8 Feb 2015 14:43:15 +0000 (16:43 +0200)
t/01-jobs.t

index 4d4f8bc..78dc416 100644 (file)
@@ -75,19 +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";
                                if ($meta->{files}{prog}) {
-                                       my $compiler = COMPILER->{$meta->{files}{prog}{format}};
+                                       my $format = $meta->{files}{prog}{format};
+                                       my $compiler = COMPILER->{$format};
                                        skip "$compiler not found in path", 3 unless $ENV{GRUNTMASTER_VM} || which $compiler;
-                                       local $TODO = $meta->{todo} if exists $meta->{todo};
+                                       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;
This page took 0.026777 seconds and 4 git commands to generate.