]> rtime.felk.cvut.cz Git - can-benchmark.git/blobdiff - tests/_lib.sh
Allow tests to generate more graphs
[can-benchmark.git] / tests / _lib.sh
index 557602f677cf3dcbb7987ae1d801af53deb2b894..281ddf90e87e08f2cfb253d6f721e96f52dd95f1 100644 (file)
@@ -79,13 +79,14 @@ run_tests() {
 }
 
 plot() {
 }
 
 plot() {
-    if [ -n "$PLOT_CMD" ]; then
-       echo "set terminal postscript color eps enhanced;
-             $PLOT_CMD" | gnuplot | epstopdf --filter > `basename $0 .sh`.pdf
+    for i in "${!PLOT_CMD[@]}"; do
        if [ -z "$OPT_PDF_ONLY" ]; then
        if [ -z "$OPT_PDF_ONLY" ]; then
-           echo "set terminal x11 enhanced; $PLOT_CMD" | gnuplot -persist
+           echo "set terminal x11 enhanced; ${PLOT_CMD[$i]}" | gnuplot -persist
        fi
        fi
-    fi
+       I=${i/0/}
+       echo "set terminal postscript color eps enhanced;
+             ${PLOT_CMD[$i]}" | gnuplot | epstopdf --filter > `basename $0 .sh`$I.pdf
+    done
 }
 
 go() {
 }
 
 go() {