From b1cad43854f775cfd8bbab0d8279758b00e2b2b6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Mon, 26 Aug 2013 12:06:42 +0200 Subject: [PATCH] Modification of *-time tests so that they don't break if the test was skipped. Now it checks and attempts to create symbolic links only if the directory it works from isn't empty. (When it is, calling "ln -s ../somedir/*.txt ." creates broken link named *.txt and plot.sh, so the plotting script attempts to create a plot, which fails and stops the rest of the plotting from happening.) --- gw-tests/filter-time.sh | 8 +++++++- gw-tests/nop-highprio-time.sh | 8 +++++++- gw-tests/nop-time.sh | 8 +++++++- gw-tests/user-time.sh | 8 +++++++- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/gw-tests/filter-time.sh b/gw-tests/filter-time.sh index c23a3b0..ed500ac 100755 --- a/gw-tests/filter-time.sh +++ b/gw-tests/filter-time.sh @@ -5,7 +5,13 @@ NO_GW_NEEDED=true main() { - ln -s ../filter/*.txt . + #Check that the test wasn't skipped. + if [ "$(ls -A ../filter)" ]; then + #Otherwise this would create *.txt file and plot.sh and break the automation + ln -s ../filter/*.txt . + else + SKIPPED=1; return; + fi; } ids="0 $(seq 255 256 2047)" diff --git a/gw-tests/nop-highprio-time.sh b/gw-tests/nop-highprio-time.sh index 22065c3..8faeeee 100755 --- a/gw-tests/nop-highprio-time.sh +++ b/gw-tests/nop-highprio-time.sh @@ -3,7 +3,13 @@ . lib.sh main() { - ln -s ../nop-highprio/*.txt . + #Check that the test wasn't skipped. + if [ "$(ls -A ../nop-highprio)" ]; then + #Otherwise this would create *.txt file and plot.sh and break the automation + ln -s ../nop-highprio/*.txt . + else + SKIPPED=1; return; + fi; } plot_cmds() { diff --git a/gw-tests/nop-time.sh b/gw-tests/nop-time.sh index 585d733..dea1483 100755 --- a/gw-tests/nop-time.sh +++ b/gw-tests/nop-time.sh @@ -3,7 +3,13 @@ . lib.sh main() { - ln -s ../nop/*.txt . + #Check that the test wasn't skipped. + if [ "$(ls -A ../nop)" ]; then + #Otherwise this would create *.txt file and plot.sh and break the automation + ln -s ../nop/*.txt . + else + SKIPPED=1; return; + fi; } ADDITIONAL_PLOTS=detail diff --git a/gw-tests/user-time.sh b/gw-tests/user-time.sh index d7e095a..c68408b 100755 --- a/gw-tests/user-time.sh +++ b/gw-tests/user-time.sh @@ -5,7 +5,13 @@ NO_GW_NEEDED=true main() { - ln -s ../user/*.txt . + #Check that the test wasn't skipped. + if [ "$(ls -A ../user)" ]; then + #Otherwise this would create *.txt file and plot.sh and break the automation + ln -s ../user/*.txt . + else + SKIPPED=1; return; + fi; } #ADDITIONAL_PLOTS=detail -- 2.39.2