Remove fs.dsk, swap.dsk after grading.
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 1 Dec 2004 22:21:56 +0000 (22:21 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Wed, 1 Dec 2004 22:21:56 +0000 (22:21 +0000)
grading/vm/run-tests

index f74bd9978aaec241878ce68cb59c5f473035ccdd..85d639d616b5d1588a720608b266139a672affa1 100755 (executable)
@@ -263,17 +263,17 @@ sub really_run_test {
     # Run.
     my ($timeout) = 600;
     my ($testargs) = defined ($args{$test}) ? " $args{$test}" : "";
-    xsystem ("pintos "
-            . "--os-disk=pintos/src/vm/build/os.dsk "
-            . "--fs-disk=output/$test/fs.dsk "
-            . "--swap-disk=output/$test/swap.dsk "
-            . "-v run -q -ex \"$test$testargs\"",
-            LOG => "$test/run",
-            TIMEOUT => $timeout,
-            EXPECT => 1)
-       or return "Bochs error";
-    
-    return "ok";
+    my ($result) = xsystem ("pintos "
+                           . "--os-disk=pintos/src/vm/build/os.dsk "
+                           . "--fs-disk=output/$test/fs.dsk "
+                           . "--swap-disk=output/$test/swap.dsk "
+                           . "-v run -q -ex \"$test$testargs\"",
+                           LOG => "$test/run",
+                           TIMEOUT => $timeout,
+                           EXPECT => 1)
+       ? "ok" : "Bochs error";
+    remove ("output/$test/fs.dsk", "output/$test/swap.dsk");
+    return $result;
 }
 
 sub grade_test {