Don't print recursive reboots.
[pintos-anon] / src / tests / make-grade
index f8c1443148cd6e0b473fb14bb4d6658759823710..23f6ec32d7a9aa4aa9594fb6cf3f62af01af33d8 100755 (executable)
@@ -25,7 +25,7 @@ open (GRADING, '<', $grading_file) || die "$grading_file: open: $!\n";
 while (<GRADING>) {
     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";
@@ -132,13 +132,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 (<OUTPUT>) {
            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);
     }