diff mbox

Fix argument handling in bc test

Message ID 5629001D.20105@sonymobile.com (mailing list archive)
State New, archived
Headers show

Commit Message

Bird, Tim Oct. 22, 2015, 3:26 p.m. UTC
The argument handling in bc was incorrect. bc-device.sh takes
two parameters but only used the first one ($1). bc-script.sh
passed the same parameter to bc-device.sh twice. This fixes
the problem.
---
This fixes this example script. I tested on a beaglebone black.

jta/engine/tests/Benchmark.bc/bc-script.sh | 2 +-
jta/engine/tests/Benchmark.bc/bc-script/bc-device.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/jta/engine/tests/Benchmark.bc/bc-script.sh b/jta/engine/tests/Benchmark.bc/bc-script.sh
index 42ec545..c170801 100755
--- a/jta/engine/tests/Benchmark.bc/bc-script.sh
+++ b/jta/engine/tests/Benchmark.bc/bc-script.sh
@@ -13,7 +13,7 @@  function test_deploy {
function test_run {
assert_define BENCHMARK_BC_EXPR1
assert_define BENCHMARK_BC_EXPR2
- report "cd $JTA_HOME/jta.$TESTDIR; ./bc-device.sh $BENCHMARK_BC_EXPR1 $BENCHMARK_BC_EXPR1"
+ report "cd $JTA_HOME/jta.$TESTDIR; ./bc-device.sh $BENCHMARK_BC_EXPR1 $BENCHMARK_BC_EXPR2"
}

. $JTA_ENGINE_PATH/scripts/benchmark.sh
diff --git a/jta/engine/tests/Benchmark.bc/bc-script/bc-device.sh b/jta/engine/tests/Benchmark.bc/bc-script/bc-device.sh
index 461e651..8223dfe 100755
--- a/jta/engine/tests/Benchmark.bc/bc-script/bc-device.sh
+++ b/jta/engine/tests/Benchmark.bc/bc-script/bc-device.sh
@@ -1,7 +1,7 @@ 
#!/bin/bash

BC_EXPR1=$1
-BC_EXPR2=$1
+BC_EXPR2=$2

BC1=`echo $BC_EXPR1 | bc`
BC2=`echo $BC_EXPR2 | bc`