aboutsummaryrefslogtreecommitdiff
path: root/test/performance/odp_scheduling_run.sh
blob: 2b4281ee90f8981f80221e0be7a1cc4c8d0804f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
#
# Copyright (c) 2015-2018, Linaro Limited
# All rights reserved.
#
# SPDX-License-Identifier:	BSD-3-Clause
#
# Script that passes command line arguments to odp_scheduling test when
# launched by 'make check'

TEST_DIR="${TEST_DIR:-$(dirname $0)}"
ALL=0

run()
{
	echo odp_scheduling_run starts requesting $1 worker threads
	echo ======================================================

	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
}

run 1
run 5
run 8
run 11
run $ALL

exit 0