Improve error message for grading when the make failed.
[pintos-anon] / grading / lib / Pintos / Grading.pm
index d48b2751c92219f4a1b55f3771d0e2a9cc657cd0..36599a0afbdd9957374843f0d50ee314d629a52c 100644 (file)
@@ -408,7 +408,9 @@ sub run_pintos {
 # Grade the test.
 sub grade_test {
     # Read test output.
-    my (@output) = snarf ("output/$test/run.out");
+    my ($outfile) = "output/$test/run.out";
+    die "$outfile: missing test output file (make failed?)" if ! -e $outfile;
+    my (@output) = snarf ($outfile);
 
     # If there's a function "grade_$test", use it to evaluate the output.
     # If there's a file "$GRADES_DIR/$test.exp", compare its contents