[Fuego] [PATCH v2] tests: Use get_program_path in test_run function
[email protected] Fri, 29 Oct 2021 14:04:21 +0530
| Newsgroups | dev.linux.lists.fuego |
|---|---|
| Message-ID | <[email protected]> |
From: venkata pyla <[email protected]> In order to use the test programs installed in the board's default PATH use get_program_path function, which will find the program in the PATH location or in the board test directory. Signed-off-by: venkata pyla <[email protected]> --- tests/Benchmark.fio/fuego_test.sh | 5 +++-- tests/Benchmark.migratetest/fuego_test.sh | 3 ++- tests/Benchmark.pmqtest/fuego_test.sh | 3 ++- tests/Benchmark.ptsematest/fuego_test.sh | 3 ++- tests/Benchmark.signaltest/fuego_test.sh | 3 ++- tests/Benchmark.sigwaittest/fuego_test.sh | 3 ++- tests/Benchmark.svsematest/fuego_test.sh | 3 ++- tests/Functional.pi_tests/fuego_test.sh | 3 ++- 8 files changed, 17 insertions(+), 9 deletions(-) diff --git a/tests/Benchmark.fio/fuego_test.sh b/tests/Benchmark.fio/fuego_test.sh index 039ec15..363a5ef 100755 --- a/tests/Benchmark.fio/fuego_test.sh +++ b/tests/Benchmark.fio/fuego_test.sh @@ -36,8 +36,9 @@ function test_deploy { function test_run { hd_test_mount_prepare $BENCHMARK_FIO_MOUNT_BLOCKDEV $BENCHMARK_FIO_MOUNT_POINT - report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./fio ssd-test-current --timeout=$BENCHMARK_FIO_TIMEOUT" - report_append "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./fio fsx-current --timeout=$BENCHMARK_FIO_TIMEOUT" + get_program_path fio + report "$PROGRAM_FIO ssd-test-current --timeout=$BENCHMARK_FIO_TIMEOUT" + report_append "$PROGRAM_FIO fsx-current --timeout=$BENCHMARK_FIO_TIMEOUT" hd_test_clean_umount $BENCHMARK_FIO_MOUNT_BLOCKDEV $BENCHMARK_FIO_MOUNT_POINT } diff --git a/tests/Benchmark.migratetest/fuego_test.sh b/tests/Benchmark.migratetest/fuego_test.sh index eeaa4f6..af5d8a5 100755 --- a/tests/Benchmark.migratetest/fuego_test.sh +++ b/tests/Benchmark.migratetest/fuego_test.sh @@ -23,5 +23,6 @@ function test_deploy { } function test_run { - report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./${TEST_COMMAND} $BENCHMARK_MIGRATETEST_PARAMS" + get_program_path rt-migrate-test + report "$PROGRAM_RT_MIGRATE_TEST $BENCHMARK_MIGRATETEST_PARAMS" } diff --git a/tests/Benchmark.pmqtest/fuego_test.sh b/tests/Benchmark.pmqtest/fuego_test.sh index 6733e78..72a8fce 100755 --- a/tests/Benchmark.pmqtest/fuego_test.sh +++ b/tests/Benchmark.pmqtest/fuego_test.sh @@ -27,5 +27,6 @@ function test_run { # The number for getting the lines depends on the cpu number of target machine. target_cpu_number=$(cmd "nproc") getting_line_number=$(( $target_cpu_number + $target_cpu_number )) - report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./pmqtest $BENCHMARK_PMQTEST_PARAMS | tail -$getting_line_number" + get_program_path pmqtest + report "$PROGRAM_PMQTEST $BENCHMARK_PMQTEST_PARAMS | tail -$getting_line_number" } diff --git a/tests/Benchmark.ptsematest/fuego_test.sh b/tests/Benchmark.ptsematest/fuego_test.sh index a626d44..8ddb53c 100755 --- a/tests/Benchmark.ptsematest/fuego_test.sh +++ b/tests/Benchmark.ptsematest/fuego_test.sh @@ -27,5 +27,6 @@ function test_run { # The number for getting the lines depends on the cpu number of target machine. target_cpu_number=$(cmd "cat /proc/cpuinfo | grep processor | wc -l") getting_line_number=$(( $target_cpu_number + $target_cpu_number )) - report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./ptsematest $BENCHMARK_PTSEMATEST_PARAMS | tail -$getting_line_number" + get_program_path ptsematest + report "$PROGRAM_PTSEMATEST $BENCHMARK_PTSEMATEST_PARAMS | tail -$getting_line_number" } diff --git a/tests/Benchmark.signaltest/fuego_test.sh b/tests/Benchmark.signaltest/fuego_test.sh index 54e08b1..b70f99d 100755 --- a/tests/Benchmark.signaltest/fuego_test.sh +++ b/tests/Benchmark.signaltest/fuego_test.sh @@ -22,5 +22,6 @@ function test_deploy { } function test_run { - report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./signaltest $BENCHMARK_SIGNALTEST_PARAMS" + get_program_path signaltest + report "$PROGRAM_SIGNALTEST $BENCHMARK_SIGNALTEST_PARAMS" } diff --git a/tests/Benchmark.sigwaittest/fuego_test.sh b/tests/Benchmark.sigwaittest/fuego_test.sh index e419f17..57b118a 100755 --- a/tests/Benchmark.sigwaittest/fuego_test.sh +++ b/tests/Benchmark.sigwaittest/fuego_test.sh @@ -27,5 +27,6 @@ function test_run { # The number for getting the lines depends on the cpu number of target machine. target_cpu_number=$(cmd "nproc") getting_line_number=$(( $target_cpu_number + $target_cpu_number )) - report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./sigwaittest $BENCHMARK_SIGWAITTEST_PARAMS | tail -$getting_line_number" + get_program_path sigwaittest + report "$PROGRAM_SIGWAITTEST $BENCHMARK_SIGWAITTEST_PARAMS | tail -$getting_line_number" } diff --git a/tests/Benchmark.svsematest/fuego_test.sh b/tests/Benchmark.svsematest/fuego_test.sh index 2f6e914..89d8335 100755 --- a/tests/Benchmark.svsematest/fuego_test.sh +++ b/tests/Benchmark.svsematest/fuego_test.sh @@ -27,5 +27,6 @@ function test_run { # The number for getting the lines depends on the cpu number of target machine. target_cpu_number=$(cmd "cat /proc/cpuinfo | grep processor | wc -l") getting_line_number=$(( $target_cpu_number + $target_cpu_number )) - report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./svsematest $BENCHMARK_SVSEMATEST_PARAMS | tail -$getting_line_number" + get_program_path svsematest + report "$PROGRAM_SVSEMATEST $BENCHMARK_SVSEMATEST_PARAMS | tail -$getting_line_number" } diff --git a/tests/Functional.pi_tests/fuego_test.sh b/tests/Functional.pi_tests/fuego_test.sh index bf94a63..e0783ea 100755 --- a/tests/Functional.pi_tests/fuego_test.sh +++ b/tests/Functional.pi_tests/fuego_test.sh @@ -22,7 +22,8 @@ function test_deploy { } function test_run { - report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./pi_stress $FUNCTIONAL_PI_TESTS_PARAMS" + get_program_path pi_stress + report "$PROGRAM_PI_STRESS $FUNCTIONAL_PI_TESTS_PARAMS" } function test_processing { -- 2.20.1