Don't print output for triple faults.
[pintos-anon] / src / tests / tests.pm
index d085df1c98de59d7430a7cfc3dc9caa571f5672f..2e3642c664a0449217d0ad7058537e7c389233f0 100644 (file)
@@ -1,6 +1,6 @@
 use strict;
 use warnings;
-use Algorithm::Diff;
+use tests::Algorithm::Diff;
 
 sub fail;
 sub pass;
@@ -80,12 +80,6 @@ sub check_for_keyword {
     $kw_line =~ s/^\([^\)]+\)\s+//;
     print "$kw_line\n";
 
-    # Append output, eliminating uninteresting header and trailer info
-    # if possible.
-    my (@core) = get_core_output (@output);
-    @output = @core if @core;
-    print "Program output:\n\n" . join ('', map ("$_\n", @output));
-
     fail;
 }
 
@@ -96,18 +90,9 @@ sub check_for_triple_fault {
 
     print <<EOF;
 Pintos spontaneously rebooted during this test.
-This is most often caused by unhandled page faults.  Output from
-initial boot through the first reboot is shown below:
-
+This is most often caused by unhandled page faults.
 EOF
 
-    my ($i) = 0;
-    local ($_);
-    for (@output) {
-       print "  $_\n";
-       last if /Pintos booting/ && ++$i > 1;
-    }
-
     fail;
 }
 
@@ -133,13 +118,13 @@ sub compare_output {
     }
     die "unknown option " . (keys (%options))[0] . "\n" if %options;
 
-    my ($msg) = "Actual output:\n" . join ('', map ("  $_\n", @output));
+    my ($msg);
 
     # Compare actual output against each allowed output.
     foreach my $exp_string (@$expected) {
        my (@expected) = split ("\n", $exp_string);
 
-       $msg .= "\nAcceptable output:\n";
+       $msg .= "Acceptable output:\n";
        $msg .= join ('', map ("  $_\n", @expected));
 
        # Check whether actual and expected match.