active_pd() should return a virtual address. Thanks to Guy Isely
[pintos-anon] / grading / lib / Pintos / Grading.pm
index 30ac7101493b473bf96a316f0268e986f64581fb..6a21d5231edf2851ea6370148c9b84e0331722b9 100644 (file)
@@ -138,10 +138,9 @@ sub extract_sources {
                 LOG => $stem, DIE => "applying patch $stem failed\n");
     }
 
-    # Install default pintos/src/constants.h.
+    # Install default pintos/src/constants.h (which is empty).
     open (CONSTANTS, ">pintos/src/constants.h")
        or die "constants.h: create: $!\n";
-    print CONSTANTS "#define THREAD_JOIN_IMPLEMENTED 1\n";
     close CONSTANTS;
 }
 
@@ -422,7 +421,14 @@ sub run_pintos {
 sub grade_test {
     # Read test output.
     my ($outfile) = "output/$test/run.out";
-    die "$outfile: missing test output file (make failed?)" if ! -e $outfile;
+    if (! -e $outfile) {
+       if (-s "output/$test/make.err") {
+           # make failed.
+           $details{$test} = snarf ("output/$test/make.err");
+           return "make failed.  Error messages at end of file.";
+       }
+       die "$outfile: missing test output file";
+    }
     my (@output) = snarf ($outfile);
 
     # If there's a function "grade_$test", use it to evaluate the output.