[Fuego] [PATCH] tests: use get_program_path in test_run function
[email protected] Thu, 21 Oct 2021 21:53:13 +0530
| Newsgroups | dev.linux.lists.fuego |
|---|---|
| Message-ID | <[email protected]> |
From: venkata <[email protected]> Inordred to use the test programs installed in the board's default PATH use get_program_path function which will first check the program in the PATH location then checks in the board test directory. Signed-off-by: venkata <[email protected]> --- tests/Benchmark.IOzone/fuego_test.sh | 3 ++- tests/Benchmark.bonnie/fuego_test.sh | 9 ++------- tests/Benchmark.cyclictest/fuego_test.sh | 3 ++- tests/Benchmark.hackbench/fuego_test.sh | 3 ++- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/Benchmark.IOzone/fuego_test.sh b/tests/Benchmark.IOzone/fuego_test.sh index 86ec12f..8bbf826 100755 --- a/tests/Benchmark.IOzone/fuego_test.sh +++ b/tests/Benchmark.IOzone/fuego_test.sh @@ -39,7 +39,8 @@ function test_deploy { function test_run { hd_test_mount_prepare $BENCHMARK_IOZONE_MOUNT_BLOCKDEV $BENCHMARK_IOZONE_MOUNT_POINT - report "cd $BENCHMARK_IOZONE_MOUNT_POINT; $BOARD_TESTDIR/fuego.$TESTDIR/iozone -a $BENCHMARK_IOZONE_TESTS -O -R -b $BOARD_TESTDIR/fuego.$TESTDIR/results.${BUILD_ID}.${BUILD_NUMBER}.xls -g $BENCHMARK_IOZONE_FILE_SIZE" + get_program_path iozone + report "cd $BENCHMARK_IOZONE_MOUNT_POINT; $PROGRAM_IOZONE -a $BENCHMARK_IOZONE_TESTS -O -R -b $BOARD_TESTDIR/fuego.$TESTDIR/results.${BUILD_ID}.${BUILD_NUMBER}.xls -g $BENCHMARK_IOZONE_FILE_SIZE" get $BOARD_TESTDIR/fuego.$TESTDIR/results.${BUILD_ID}.${BUILD_NUMBER}.xls ${LOGDIR}/results.xls hd_test_clean_umount $BENCHMARK_IOZONE_MOUNT_BLOCKDEV $BENCHMARK_IOZONE_MOUNT_POINT diff --git a/tests/Benchmark.bonnie/fuego_test.sh b/tests/Benchmark.bonnie/fuego_test.sh index 115b3d4..8a7f6ad 100755 --- a/tests/Benchmark.bonnie/fuego_test.sh +++ b/tests/Benchmark.bonnie/fuego_test.sh @@ -50,13 +50,8 @@ function test_run { BONNIE_ROOT_PARAM="" fi - 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" + get_program_path "bonnie++" + report "pwd; ls; $PROGRAM_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" sync diff --git a/tests/Benchmark.cyclictest/fuego_test.sh b/tests/Benchmark.cyclictest/fuego_test.sh index 74d9d24..352a148 100755 --- a/tests/Benchmark.cyclictest/fuego_test.sh +++ b/tests/Benchmark.cyclictest/fuego_test.sh @@ -24,5 +24,6 @@ function test_deploy { } function test_run { - report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./cyclictest $BENCHMARK_CYCLICTEST_PARAMS" + get_program_path cyclictest + report "$PROGRAM_CYCLICTEST $BENCHMARK_CYCLICTEST_PARAMS" } diff --git a/tests/Benchmark.hackbench/fuego_test.sh b/tests/Benchmark.hackbench/fuego_test.sh index cc05c74..be42509 100755 --- a/tests/Benchmark.hackbench/fuego_test.sh +++ b/tests/Benchmark.hackbench/fuego_test.sh @@ -16,5 +16,6 @@ function test_deploy { } function test_run { - report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./hackbench $BENCHMARK_HACKBENCH_PARAMS" + get_program_path hackbench + report "$PROGRAM_HACKBENCH $BENCHMARK_HACKBENCH_PARAMS" } -- 2.20.1