X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=bench.sh;h=7c9eec856f0b3158cc5997422ba9c7d56479aa98;hb=refs%2Fheads%2Fmaster;hp=195e72d25e2541877078223073d17223d200ea92;hpb=8c19c4c22a76ba53d7eff91102a489bb44c805d7;p=model-checker-benchmarks.git diff --git a/bench.sh b/bench.sh index 195e72d..7c9eec8 100755 --- 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