[Fuego] [PATCH 3/4] bonnie: support binaries in the target

Daniel Sangorrin daniel.sangorrin at toshiba.co.jp
Wed Mar 28 08:32:00 UTC 2018


This should be done with the NEED_XXX framework so that
the build and deploy phases are skipped. But since that
is not yet available I added some ifs for now.

I tested it on debian jessie and found that the output
format of new versions of bonnie has changed and for
that reason our parser fails. I think we should upgrade
the test version, maybe for the next release.

Signed-off-by: Daniel Sangorrin <daniel.sangorrin at toshiba.co.jp>
---
 engine/tests/Benchmark.bonnie/fuego_test.sh | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/engine/tests/Benchmark.bonnie/fuego_test.sh b/engine/tests/Benchmark.bonnie/fuego_test.sh
index 4831de9..a6240fb 100755
--- a/engine/tests/Benchmark.bonnie/fuego_test.sh
+++ b/engine/tests/Benchmark.bonnie/fuego_test.sh
@@ -5,15 +5,22 @@ function test_pre_check {
     assert_define BENCHMARK_BONNIE_MOUNT_POINT
     assert_define BENCHMARK_BONNIE_SIZE
     assert_define BENCHMARK_BONNIE_ROOT
+    is_on_target_path bonnie\+\+ PROGRAM_BONNIE
 }
 
 function test_build {
-    ./configure --host=$HOST --build=`uname -m`-linux-gnu;
-    LFLAGS="-static" make
+    if [ -z "$PROGRAM_BONNIE" ]; then
+        ./configure --host=$HOST --build=`uname -m`-linux-gnu;
+        LFLAGS="-static" make
+    else
+        echo "Skipping build phase, bonnie++ is already on the target"
+    fi
 }
 
 function test_deploy {
-    put bonnie++  $BOARD_TESTDIR/fuego.$TESTDIR/
+    if [ -z "$PROGRAM_BONNIE" ]; then
+        put bonnie++  $BOARD_TESTDIR/fuego.$TESTDIR/
+    fi
 }
 
 function test_run {
@@ -33,7 +40,13 @@ function test_run {
         BONNIE_ROOT_PARAM=""
     fi
 
-    report "cd $BOARD_TESTDIR/fuego.$TESTDIR; pwd; ls; ./bonnie\+\+ -d $BENCHMARK_BONNIE_MOUNT_POINT/fuego.$TESTDIR $BONNIE_ROOT_PARAM -s $BENCHMARK_BONNIE_SIZE -r $BENCHMARK_BONNIE_RAM -n $BENCHMARK_BONNIE_NUM_FILES -m $NODE_NAME"
+    if [ -z "$PROGRAM_BONNIE" ]; then
+        BONNIE_CMD="./bonnie\+\+"
+    else
+        BONNIE_CMD="bonnie\+\+"
+    fi
+
+    report "cd $BOARD_TESTDIR/fuego.$TESTDIR; pwd; ls; $BONNIE_CMD -d $BENCHMARK_BONNIE_MOUNT_POINT/fuego.$TESTDIR $BONNIE_ROOT_PARAM -s $BENCHMARK_BONNIE_SIZE -r $BENCHMARK_BONNIE_RAM -n $BENCHMARK_BONNIE_NUM_FILES -m $NODE_NAME"
 
     sync
 
-- 
2.7.4




More information about the Fuego mailing list