From 2995a16146cc060754f0cd5ce6080cf2d60b9846 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 25 Jan 2005 20:50:29 +0000 Subject: [PATCH] Be smarter about dealing with make failures. --- grading/lib/Pintos/Grading.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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. -- 2.30.2