[Fuego] [PATCH 05/15] ptsematest: fix no nproc cmd on board

Qiu Tingting qiutt at cn.fujitsu.com
Thu Nov 15 04:26:02 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.ptsematest/fuego_test.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/engine/tests/Benchmark.ptsematest/fuego_test.sh b/engine/tests/Benchmark.ptsematest/fuego_test.sh
index fc1a385..5f3fb44 100755
--- a/engine/tests/Benchmark.ptsematest/fuego_test.sh
+++ b/engine/tests/Benchmark.ptsematest/fuego_test.sh
@@ -19,7 +19,7 @@ function test_run {
     # ptsematest 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; ./ptsematest $BENCHMARK_PTSEMATEST_PARAMS | tail -$getting_line_number"
 }
-- 
2.7.4





More information about the Fuego mailing list