forked from cubicle-model-checker/cubicle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbench
executable file
·33 lines (26 loc) · 779 Bytes
/
bench
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
shopt -s nullglob
to=$1
cubicle=$2
score=0
max=0
FILES="bakery.cub bakery_lamport.cub bakery_uguard.cub bakery_uguard2.cub berkeley.cub burns.cub crash.cub dekker.cub dekker_limbo.cub dekker_loc.cub dekker_n.cub dijkstra.cub illinois.cub jml.cub mesi.cub moesi.cub motivating.cub mutex.cub mux_sem.cub peterson_two_proc.cub sense_barrier.cub synapse.cub two-semaphores.cub xerox_dragon.cub"
for f in $FILES; do
echo $f;
max=`expr $max + 1`;
timeout $to $cubicle $f > /dev/null 2>&1;
res=$?
case $res in
"1")
echo
echo " ECHEC";;
"0")
echo " OK";
score=`expr $score + 1`;;
*)
echo
echo "ECHEC sur "$f;;
esac
done
percent=`expr 100 \* $score / $max`;
echo "Results : $score/$max = $percent%";