From: Ben Pfaff Date: Tue, 25 Jan 2005 20:50:29 +0000 (+0000) Subject: Be smarter about dealing with make failures. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44b7b37aebbef7a35c5cbe83da80bd8577498849;p=pintos-anon Be smarter about dealing with make failures. --- diff --git a/grading/lib/Pintos/Grading.pm b/grading/lib/Pintos/Grading.pm index 30ac710..f29dc05 100644 --- a/grading/lib/Pintos/Grading.pm +++ b/grading/lib/Pintos/Grading.pm @@ -422,7 +422,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.