diff --git a/test/Cycle_unison/Sh/do_org_lines.sh b/test/Cycle_unison/Sh/do_org_lines.sh new file mode 100644 index 0000000000000000000000000000000000000000..cdfb1a0c7eea64a8dd6b626a16c3ccf34ed9a39c --- /dev/null +++ b/test/Cycle_unison/Sh/do_org_lines.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# Prends en argument k n topologie +# Exemple : ./search_config.sh 3 7 ring + + +set -x +if [ $# -ne 3 ] + then echo "3 arguments are expected" + echo "$0 <k> <n> <topology filename without extension" + echo "Exemple : ./search_config.sh 3 7 ring" + exit 1 +fi + +k=$1 +n=$2 +topology=$3 +log=Log/$topology${k}_$n.log + + +############################################################## +# building the org table of results using the Log/*.log files + +valid="" +invalid="" +timeout="" + +grep "ok: valid" $log && valid="true" +grep "ok: invalid" $log && invalid="true" +grep "Wallclock timeout" $log && timeout="true" + + +time=`grep "total runtime" $log | cut -d ' ' -f5` + +if [ $valid = "true" ] + then resultat="legitimate" + step=`grep "ok: " $log | cut -d ' ' -f4 | tr -d ')'` + +else if [ $invalid = "true" ] + then resultat="cycle found" + step=`grep "ok: " $log | cut -d ' ' -f4` +else if [ $timeout = "true" ] + then resultat="Timeout (${TIMEOUT})" + step=`grep "ok: " $log | cut -d ' ' -f5` + time="-" +else + resultat="..." +fi +fi +fi + +# d=$(expr $n / 2) +d=$(expr $n / 2) +dx2m1=$(expr $d \* 2 - 1) +dx3m1=$(expr $d \* 3 - 1) + + +echo "| $topology | $n | $k | $dx2m1 | $dx3m1 | $step | $resultat | $time |" > $log.org + diff --git a/test/Cycle_unison/Sh/search_config.sh b/test/Cycle_unison/Sh/search_config.sh index 037b8be14c4b2f1334c8359245c766d334b1dcc6..67048aaaa9b74317bcd18fe33543f3bab45894f1 100644 --- a/test/Cycle_unison/Sh/search_config.sh +++ b/test/Cycle_unison/Sh/search_config.sh @@ -40,30 +40,5 @@ mv $topology${n}_check_cycles.noexpand.lv4.tmp $topology${n}_check_cycles.noexpa [ -d Log ] || mkdir Log time kind2 --timeout ${TIMEOUT} --color false --modular true --compositional true $topology${n}_check_cycles.noexpand.lv4 > $log -d=$(expr $n / 2 \* 2 - 1) - - - -grep "ok: valid" $log && valid="true" -grep "ok: invalid" $log && invalid="true" - -time=`grep "total runtime" $log | cut -d ' ' -f5` - -if [ $valid = "true" ] - then resultat="legitimate" - step=`grep "ok: " $log | cut -d ' ' -f4 | tr -d ')'` - -else if [ $invalid = "true" ] - then resultat="cycle found" - step=`grep "ok: " $log | cut -d ' ' -f4` -else - resultat="Timeout (${TIMEOUT})" - step=`grep "ok: " $log | cut -d ' ' -f5` - time="-" -fi -fi - - -echo "| $topology | $n | $k | $d | $step | $resultat | $time |" > $log.org - +############################################################## clean $topology$n diff --git a/test/unison/Makefile b/test/unison/Makefile index 696e9a1c59feca9ae2c1ec927a0bae52253cbee1..13c77c70b0da5abaa10d434b8b5f2318a3ac48dc 100644 --- a/test/unison/Makefile +++ b/test/unison/Makefile @@ -37,7 +37,17 @@ kind2: $(TOPOLOGY).kind2 lesar: $(TOPOLOGY).lesar org: - echo "| Topology | n | k | inutile (car faux) | step | Resultat | time |" > resultat.org + echo "| Topology | n | k | 2xD-1 | 3xD-1 | step | Resultat | time |" > resultat.org echo "|-|" >> resultat.org - cat Log/*.org >> resultat.org + for n in `seq 3 35`; \ + do for k in `seq 3 2 35`; do \ + [ -f Log/ring$${k}_$${n}.log ] && sh Sh/do_org_lines.sh $${k} $${n} ring && \ + cat Log/ring$${k}_$${n}.log.org >> resultat.org; \ + done; \ + echo "|-|" >> resultat.org ;\ + done echo "|-|" >> resultat.org + + +RUN: + for i in `seq 3 35`; do sleep 2; sh Sh/search_config.sh 11 $i ring &; done