From: Martin Hořeňovský Date: Mon, 26 Aug 2013 10:06:42 +0000 (+0200) Subject: Modification of *-time tests so that they don't break if the test was skipped. X-Git-Tag: fix-allnoconfig~151 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/commitdiff_plain/b1cad43854f775cfd8bbab0d8279758b00e2b2b6?ds=sidebyside 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.) --- 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