aboutsummaryrefslogtreecommitdiff
path: root/test/performance/odp_scheduling_run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/performance/odp_scheduling_run.sh')
-rwxr-xr-xtest/performance/odp_scheduling_run.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/test/performance/odp_scheduling_run.sh b/test/performance/odp_scheduling_run.sh
index 082dc4521..2b4281ee9 100755
--- a/test/performance/odp_scheduling_run.sh
+++ b/test/performance/odp_scheduling_run.sh
@@ -14,14 +14,17 @@ ALL=0
run()
{
echo odp_scheduling_run starts requesting $1 worker threads
- echo ===============================================
+ echo ======================================================
- $TEST_DIR/odp_scheduling${EXEEXT} -c $1
-
- RET_VAL=$?
- if [ $RET_VAL -ne 0 ]; then
- echo odp_scheduling FAILED
- exit $RET_VAL
+ if [ $(nproc) -lt $1 ]; then
+ echo "Not enough CPU cores. Skipping test."
+ else
+ $TEST_DIR/odp_scheduling${EXEEXT} -c $1
+ RET_VAL=$?
+ if [ $RET_VAL -ne 0 ]; then
+ echo odp_scheduling FAILED
+ exit $RET_VAL
+ fi
fi
}