X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=grading%2Flib%2FPintos%2FGrading.pm;h=7e5ec67fb008f7fc5ad06353b1f2c9ae574eb98f;hb=6ebebc408e12133c4130923081c40bbfbdd281d4;hp=36599a0afbdd9957374843f0d50ee314d629a52c;hpb=0c9836a6422fe07c539bd0f08965011a7b164b0e;p=pintos-anon diff --git a/grading/lib/Pintos/Grading.pm b/grading/lib/Pintos/Grading.pm index 36599a0..7e5ec67 100644 --- a/grading/lib/Pintos/Grading.pm +++ b/grading/lib/Pintos/Grading.pm @@ -16,6 +16,11 @@ use POSIX; use Getopt::Long qw(:config no_ignore_case); use Algorithm::Diff; +# We execute lots of subprocesses. +# Without this, our stdout output can get flushed multiple times, +# which is harmless but looks bizarre. +$| = 1; + sub parse_cmd_line { my ($do_regex, $no_regex); GetOptions ("v|verbose+" => \$verbose, @@ -827,5 +832,12 @@ sub file_contains { close (FILE); return $equal; } + +sub success { + for my $test (@TESTS) { + return 1 if !defined ($result{$test}) || $result{$test} ne 'ok'; + } + return 0; +} 1;