From: Brian Norris Date: Sat, 3 Nov 2012 03:14:31 +0000 (-0700) Subject: bench: allow log directory to be placed elsewhere X-Git-Tag: pldi2013~17 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=model-checker-benchmarks.git;a=commitdiff_plain;h=74decfe4569dcbce42c34a3cfd74082e7c84ced9 bench: allow log directory to be placed elsewhere Now, you can run: ./bench.sh e.g., ./bench.sh /tmp Will create a directory /tmp/run- for the logs. --- diff --git a/bench.sh b/bench.sh index 8337ab3..8886bcc 100755 --- a/bench.sh +++ b/bench.sh @@ -1,14 +1,20 @@ #!/bin/bash # A (work-in-progress) test script for running our benchmarks -# Runs all tests, logging output to a directory named 'run-' +# Runs all tests, logging output to a directory named +# '${BASEDIR}/run-', where ${BASEDIR} is either the current +# directory or the first parameter to this script ## Unfinished benchmarks - do not use # queue williams-queue DATECMD="date +%Y-%m-%d-%R" DATE="`${DATECMD}`" -DIR="run-${DATE}" +BASEDIR=. + +[ $# -gt 0 ] && [ -d "$1" ] && BASEDIR="$1" && shift + +DIR="${BASEDIR}/run-${DATE}" TESTS="barrier/barrier mcs-lock/mcs-lock spsc-queue/spsc-queue mpmc-queue/mpmc-1r2w mpmc-queue/mpmc-2r1w mpmc-queue/mpmc-queue linuxrwlocks/linuxrwlocks" MODEL_ARGS="-f 4 -m 2"