3 # A (work-in-progress) test script for running our benchmarks
4 # Runs all tests, with timing information
6 DATECMD="date +%Y-%m-%d-%R"
9 TESTS="chase-lev-deque/main"
10 TESTS+=" spsc-queue/spsc-queue"
11 TESTS+=" spsc-bugfix/spsc-queue"
12 TESTS+=" barrier/barrier"
13 TESTS+=" dekker-fences/dekker-fences"
14 TESTS+=" mcs-lock/mcs-lock"
15 TESTS+=" mpmc-queue/mpmc-queue-rdwr"
16 TESTS+=" ms-queue/main"
17 TESTS+=" linuxrwlocks/linuxrwlocks"
19 MODEL_ARGS="-y -m 2 -u 3"
21 #TESTS+=" mpmc-queue/mpmc-2r1w"
22 #TESTS+=" mpmc-queue/mpmc-1r2w-noinit"
23 #TESTS+=" mpmc-queue/mpmc-queue-rdwr"
24 #TESTS+=" mpmc-queue/mpmc-queue-noinit"
34 echo "-----------------------------------------------"
35 echo "*******************************"
36 echo "Running test ${COUNT} (${t})"
38 echo "*******************************"
39 (time ${RUN} ${t} ${ARGS} 2>&1) 2>&1
41 echo "Test done; sleeping for a few seconds"
47 function run_all_tests {
52 run_test ${t} ${MODEL_ARGS}
54 #run_test mpmc-queue/mpmc-queue ${MODEL_ARGS} -- -r 2 -w 1
55 #run_test mpmc-queue/mpmc-queue ${MODEL_ARGS} -- -r 1 -w 2
56 #run_test mpmc-queue/mpmc-queue ${MODEL_ARGS} -- -r 2 -w 2
59 # Check if git is available, and this is a git repository
61 which git &> /dev/null && git rev-parse &> /dev/null && GIT=1
63 # Print out some git information, if available
64 if [ ${GIT} -ne 0 ]; then