Make tests public. Rewrite most tests. Add tests.
[pintos-anon] / grading / vm / prep-disk
diff --git a/grading/vm/prep-disk b/grading/vm/prep-disk
deleted file mode 100755 (executable)
index 50a6b79..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#! /usr/bin/perl -w
-
-use strict;
-use Getopt::Long;
-use POSIX;
-
-my ($pintos) = "pintos";
-my ($os_disk) = "../../src/userprog/build/os.dsk";
-my ($fs_disk);
-
-GetOptions ("os-disk=s" => \$os_disk,
-           "fs-disk=s" => \$fs_disk,
-           "help" => sub { usage (0) })
-    or die "option parsing failed; use --help for help\n";
-
-if (!defined $fs_disk) {
-    die "output disk name expected; use --help for help\n"
-       if @ARGV < 1;
-    $fs_disk = shift @ARGV;
-}
-
-if (! -e $os_disk) {
-    print STDERR "$os_disk: stat: $!\n";
-    print STDERR "perhaps you should `make' in ../../src/userprog?\n";
-    exit 1;
-}
-
-our ($formatted) = 0;
-
-unlink $fs_disk;
-xsystem ("$pintos make-disk '$fs_disk' 2");
-while (@ARGV) {
-    put_file (shift (@ARGV));
-}
-
-sub put_file {
-    my ($fn) = @_;
-    my ($cmd) = "$pintos -v --os-disk='$os_disk' --fs-disk='$fs_disk' put";
-    $cmd .= " -f", $formatted = 1 if !$formatted;
-    $cmd .= " '$fn'";
-    xsystem ($cmd);
-}
-
-sub xsystem {
-    my ($cmd) = @_;
-    print "$cmd\n";
-    system ($cmd) == 0 or die "command failed\n";
-}