add treiber stack
[model-checker-benchmarks.git] / bench.sh
index 195e72d25e2541877078223073d17223d200ea92..7c9eec856f0b3158cc5997422ba9c7d56479aa98 100755 (executable)
--- a/bench.sh
+++ b/bench.sh
@@ -3,9 +3,6 @@
 # A (work-in-progress) test script for running our benchmarks
 # Runs all tests, with timing information
 
-## Unfinished benchmarks - do not use
-# queue williams-queue
-
 DATECMD="date +%Y-%m-%d-%R"
 DATE="`${DATECMD}`"
 
@@ -59,9 +56,16 @@ function run_all_tests {
        #run_test mpmc-queue/mpmc-queue ${MODEL_ARGS} -- -r 2 -w 2
 }
 
-cd ..
-git log --oneline -1
-cd - > /dev/null
-git log --oneline -1
-echo
+# Check if git is available, and this is a git repository
+GIT=0
+which git &> /dev/null && git rev-parse &> /dev/null && GIT=1
+
+# Print out some git information, if available
+if [ ${GIT} -ne 0 ]; then
+       cd ..
+       git log --oneline -1
+       cd - > /dev/null
+       git log --oneline -1
+       echo
+fi
 run_all_tests