From 4a896b80a58599689b2e9158534a57bb42b399a4 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Wed, 1 Dec 2010 12:55:27 +0100 Subject: [PATCH 1/1] lib: Add echo_plot() to make plotting of multiple graphs easier --- gw-tests/gw-filter.sh | 4 +--- gw-tests/lib.sh | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gw-tests/gw-filter.sh b/gw-tests/gw-filter.sh index bebdc3f..757f328 100755 --- a/gw-tests/gw-filter.sh +++ b/gw-tests/gw-filter.sh @@ -22,11 +22,9 @@ plot [0:1500] [1:$COUNT] \\ EOF lt=1 for i in $ids; do - (( i != 0)) && echo ", \\" - echo -n " " \"hist-$i.dat\" with lp lt $lt title \"Message id $i\" + echo_plot "\"hist-$i.dat\" with lp lt $lt title \"Message id $i\"" lt=$((lt+1)) done - echo } test_end diff --git a/gw-tests/lib.sh b/gw-tests/lib.sh index 439ddc7..cacde47 100644 --- a/gw-tests/lib.sh +++ b/gw-tests/lib.sh @@ -65,6 +65,13 @@ create_dirs_and_links() { echo $d } +echo_plot() { + plot=$1 + [[ "$_plot_separator" ]] && echo ", \\" + _plot_separator=t + echo -n " " $plot +} + _run() { if [[ ! "$OPT_PLOT_ONLY" ]]; then kernel_versions=$(sshgw uname -r) -- 2.39.2