[Ezbench-dev] [PATCH] runner.sh: Use double brackets when using bashisms

Petri Latvala petri.latvala at intel.com
Mon Mar 6 11:45:47 UTC 2017


The check for whether to insert a timing_DB entry was using && inside
a single-bracket test. && only works with the bash-only
double-bracket test.

Signed-off-by: Petri Latvala <petri.latvala at intel.com>
---
 runner.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/runner.sh b/runner.sh
index 936acc3..a975743 100755
--- a/runner.sh
+++ b/runner.sh
@@ -507,7 +507,7 @@ function run_bench {
     callIfDefined run_bench_post_hook
 
     # If the test does not have subtests, then store the execution time
-    if [ -z "$testSubTests" && "$testExecutionType" != "resume" ]; then
+    if [[ -z "$testSubTests" && "$testExecutionType" != "resume" ]]; then
         "$ezBenchDir/timing_DB/timing.py" -n test -k "$testName" -a $test_exec_time
     fi
 
-- 
2.9.3



More information about the Ezbench-dev mailing list