[Fuego] [PATCH 11/15] svsematest: fix no nproc cmd on board

Qiu Tingting qiutt at cn.fujitsu.com
Thu Nov 15 04:26:08 UTC 2018


If there is no nproc cmd on board, can not get target_cpu_number.
Get target_cpu_number from /proc/cpuinfo file.

Signed-off-by: Qiu Tingting <qiutt at cn.fujitsu.com>
---
 engine/tests/Benchmark.svsematest/fuego_test.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/engine/tests/Benchmark.svsematest/fuego_test.sh b/engine/tests/Benchmark.svsematest/fuego_test.sh
index 815cec2..f2ebd18 100755
--- a/engine/tests/Benchmark.svsematest/fuego_test.sh
+++ b/engine/tests/Benchmark.svsematest/fuego_test.sh
@@ -19,7 +19,7 @@ function test_run {
     # svsematest does not support a option for printing a summary only on exit.
     # So, We get some lines at the end of the command's output.
     # The number for getting the lines depends on the cpu number of target machine.
-    target_cpu_number=$(cmd "nproc")
+    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"
 }
-- 
2.7.4





More information about the Fuego mailing list