]> rtime.felk.cvut.cz Git - can-benchmark.git/commitdiff
Modification of *-time tests so that they don't break if the test was skipped.
authorMartin Hořeňovský <Martin.Horenovsky@gmail.com>
Mon, 26 Aug 2013 10:06:42 +0000 (12:06 +0200)
committerMartin Hořeňovský <Martin.Horenovsky@gmail.com>
Mon, 26 Aug 2013 10:06:42 +0000 (12:06 +0200)
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
gw-tests/nop-highprio-time.sh
gw-tests/nop-time.sh
gw-tests/user-time.sh

index c23a3b0ac0d7fe4a4b0512de30b06a0eead176a9..ed500ace04105e5d7b6578ac7ded71b77802b02d 100755 (executable)
@@ -5,7 +5,13 @@
 NO_GW_NEEDED=true
 
 main() {
 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)"
 }
 
 ids="0 $(seq 255 256 2047)"
index 22065c380cf9e33bd2dacf98a65ca11439c041c8..8faeeeebe02fc0b1bf70d7b7060f1bfd3d4a9dd6 100755 (executable)
@@ -3,7 +3,13 @@
 . lib.sh
 
 main() {
 . 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() {
 }
 
 plot_cmds() {
index 585d73343fdcbb7d92e0503fa9baac318e06f1fa..dea1483f50e7a961da5f787a01463cc4828ad991 100755 (executable)
@@ -3,7 +3,13 @@
 . lib.sh
 
 main() {
 . 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
 }
 
 ADDITIONAL_PLOTS=detail
index d7e095a3beb85a5c17519e73867a81566b389785..c68408bf4b627cea7793e97098c459b74c61c580 100755 (executable)
@@ -5,7 +5,13 @@
 NO_GW_NEEDED=true
 
 main() {
 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
 }
 
 #ADDITIONAL_PLOTS=detail