From 0c9836a6422fe07c539bd0f08965011a7b164b0e Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 1 Jan 2005 02:22:27 +0000 Subject: [PATCH] Improve error message for grading when the make failed. Still not ideal. --- grading/lib/Pintos/Grading.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/grading/lib/Pintos/Grading.pm b/grading/lib/Pintos/Grading.pm index d48b275..36599a0 100644 --- a/grading/lib/Pintos/Grading.pm +++ b/grading/lib/Pintos/Grading.pm @@ -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 -- 2.30.2