(strip_exit_codes) Include _ in the list of characters considered as
[pintos-anon] / grading / lib / Pintos / Grading.pm
index 6a21d5231edf2851ea6370148c9b84e0331722b9..90d9ba311ce548636748097f9a7f7a32c7d5b1ee 100644 (file)
@@ -138,9 +138,10 @@ sub extract_sources {
                 LOG => $stem, DIE => "applying patch $stem failed\n");
     }
 
-    # Install default pintos/src/constants.h (which is empty).
+    # Install default pintos/src/constants.h.
     open (CONSTANTS, ">pintos/src/constants.h")
        or die "constants.h: create: $!\n";
+    print CONSTANTS "#define THREAD_JOIN_IMPLEMENTED 1\n";
     close CONSTANTS;
 }
 
@@ -427,7 +428,7 @@ sub grade_test {
            $details{$test} = snarf ("output/$test/make.err");
            return "make failed.  Error messages at end of file.";
        }
-       die "$outfile: missing test output file";
+       return "preparation for test failed";
     }
     my (@output) = snarf ($outfile);
 
@@ -697,7 +698,7 @@ sub canonicalize_exit_codes {
 }
 
 sub strip_exit_codes {
-    return grep (!/^[-a-z0-9]+: exit\(-?\d+\)/, canonicalize_exit_codes (@_));
+    return grep (!/^[-_a-z0-9]+: exit\(-?\d+\)/, canonicalize_exit_codes (@_));
 }
 
 sub compare_output {