]> rtime.felk.cvut.cz Git - can-benchmark.git/commitdiff
Do not invoke gnuplot when there is nothing to plot
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 6 Dec 2010 12:31:47 +0000 (13:31 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 6 Dec 2010 12:31:47 +0000 (13:31 +0100)
gw-tests/lib.sh

index 4d6e2d75f337973119d25df949afba8c43bfa49d..467321de429e8c8b1be3214b658f84f1a18c20ff 100644 (file)
@@ -44,6 +44,7 @@ _plot() {
     local testname=`basename $0 .sh`
 
     plot_cmds | sed -e "/set title/ s/[\"']\(.*\)[\"']/\"\1\\\\n($kvers)\"/" > plot.gp
     local testname=`basename $0 .sh`
 
     plot_cmds | sed -e "/set title/ s/[\"']\(.*\)[\"']/\"\1\\\\n($kvers)\"/" > plot.gp
+    if [[ ! -s plot.gp ]]; then return; fi
     if [ -z "$OPT_NO_X11" ]; then
        echo "set terminal x11 enhanced; $(< plot.gp)" | gnuplot -persist
     fi
     if [ -z "$OPT_NO_X11" ]; then
        echo "set terminal x11 enhanced; $(< plot.gp)" | gnuplot -persist
     fi