]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/blobdiff - test.sh
Merge branch 'release/0.7.0'
[hubacji1/iamcar.git] / test.sh
diff --git a/test.sh b/test.sh
index bce5b4b329c7841d1dad2971f94e9507865c9863..65d8f209c05d32b51e569e2497e44fb8033f5896 100644 (file)
--- a/test.sh
+++ b/test.sh
@@ -1,11 +1,23 @@
 #!/bin/bash
-mkdir ./log/
-for SC in {lpar,rpar,lper,rper}; do for p in `ls bin/`;
-do (
-        cat $SC.json | \
-        #        valgrind \
-        #        --tool=callgrind \
-        #        --callgrind-out-file=log/${p}_${SC}.callgrind \
-                ./bin/$p > log/${p}_${SC}.json &&
-        python plot.py $SC.json log/${p}_${SC}.json) &
-done done
+NOFCE=999        # number of computational experiments
+SC="lpar"       # scenario to test (without `.json`)
+if [ -z $* ]; then
+        LOGDIR="log"    # directory where to store results
+else
+        LOGDIR="log_$1"
+fi
+
+for p in `ls bin/`;
+do
+        mkdir -p ${LOGDIR}/${p}
+done
+
+i=0
+while [ ${i} -le ${NOFCE} ];
+do
+        for p in `ls bin/`;
+        do
+                ./bin/${p} < ${SC}.json > ${LOGDIR}/${p}/${i}.json
+        done
+        i=$(( ${i} + 1 ))
+done