X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Ftests%2Fmake-grade;h=5f60fa3d1fe7edddbed270886228e6bd5881548a;hb=96890516ba515537cae2d4b87df7412f5ad8c73f;hp=f8c1443148cd6e0b473fb14bb4d6658759823710;hpb=556a216befb4a58e9563aeef6e827975f4a26731;p=pintos-anon diff --git a/src/tests/make-grade b/src/tests/make-grade index f8c1443..5f60fa3 100755 --- a/src/tests/make-grade +++ b/src/tests/make-grade @@ -25,7 +25,7 @@ open (GRADING, '<', $grading_file) || die "$grading_file: open: $!\n"; while () { s/#.*//; next if /^\s*$/; - my ($max_pct, $rubric_suffix) = /^\s*(\d+)%\t(.*)/ or die; + my ($max_pct, $rubric_suffix) = /^\s*(\d+(?:\.\d+)?)%\t(.*)/ or die; my ($dir) = $rubric_suffix =~ /^(.*)\//; my ($rubric_file) = "$src_dir/$rubric_suffix"; open (RUBRIC, '<', $rubric_file) or die "$rubric_file: open: $!\n"; @@ -110,6 +110,9 @@ foreach my $name (keys (%verdicts)) { } } push (@overall, sprintf ("TOTAL TESTING SCORE: %.1f%%", $pct_actual)); +if (sprintf ("%.1f", $pct_actual) eq sprintf ("%.1f", $pct_possible)) { + push (@overall, "ALL TESTED PASSED -- PERFECT SCORE"); +} my (@divider) = ('', '- ' x 38, ''); @@ -132,13 +135,17 @@ for my $test (@failures) { if (open (OUTPUT, '<', "$test.output")) { print "\nOUTPUT FROM $test:\n\n"; - my ($panics) = 0; + my ($panics, $boots) = (0, 0); while () { if (/PANIC/ && ++$panics > 2) { print "[...details of additional panic(s) omitted...]\n"; last; } print; + if (/Pintos booting/ && ++$boots > 1) { + print "[...details of reboot(s) omitted...]\n"; + last; + } } close (OUTPUT); }