aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFilip Strömbäck <filip.stromback@liu.se>2020-03-18 12:28:41 +0100
committerFilip Strömbäck <filip.stromback@liu.se>2020-03-18 17:23:10 +0100
commitc61658249181f54b30da6a096b0e46f620113fec (patch)
tree3ebdef9f17cef83d1512a98589e95803b837e39b /src
parent68c4eda1c24d56f3108648c5b1855664d7f0e8cc (diff)
downloadpintos-rs-c61658249181f54b30da6a096b0e46f620113fec.tar.gz
New tool for running single tests in Pintos.
Signed-off-by: Filip Strömbäck <filip.stromback@liu.se>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/utils/pintos-single-test28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/utils/pintos-single-test b/src/utils/pintos-single-test
new file mode 100755
index 0000000..a18d303
--- /dev/null
+++ b/src/utils/pintos-single-test
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+if [[ $# < 1 ]]
+then
+ echo "Run a single Pintos test."
+ echo "Please supply the name of the test to run, for example: tests/userprog/read-zero"
+ exit 1
+fi
+
+VERBOSE=""
+if [[ "$1" == "VERBOSE" ]]
+then
+ VERBOSE="VERBOSE=1"
+ shift
+fi
+
+if [[ -e build ]]
+then
+ cd build/
+fi
+
+if [[ -f $1.result ]]
+then
+ rm $1.result
+fi
+
+make $1.result $VERBOSE
+