Improve.
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 19 Oct 2004 22:41:37 +0000 (22:41 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 19 Oct 2004 22:41:37 +0000 (22:41 +0000)
grading/threads/run-tests

index 028f4a5a6a20fc5f43b7b3ab5280d198f832afdd..ad9cb8b40be3aff7ce8ceabe9ad9a9aa4da21af5 100755 (executable)
@@ -171,7 +171,8 @@ sub really_run_test {
     # If there's residue from an earlier test, move it to .old.
     # If there's already a .old, delete it.
     xsystem ("rm -rf output/$test.old", VERBOSE => 1) if -d "output/$test.old";
-    rename "output/$test", "output/$test.old" or die "rename: $!\n";
+    rename "output/$test", "output/$test.old" or die "rename: $!\n"
+       if -d "output/$test";
 
     # Make output directory.
     mkdir "output/$test";