summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests
diff options
context:
space:
mode:
authorDaniel Díaz <daniel.diaz@linaro.org>2017-08-17 10:55:30 -0500
committerShuah Khan <shuahkh@osg.samsung.com>2017-09-18 10:54:14 -0600
commit67b2e30eb7b346db60afe91b0927738fb604d0a4 (patch)
treef0a4d4d6067027eaef7bb8c6e744c5d7a19a0e4e /tools/testing/selftests
parent172a8ca880f1c8b01bc4d1e0239bcb293ef65e0b (diff)
downloadop-kernel-dev-67b2e30eb7b346db60afe91b0927738fb604d0a4.zip
op-kernel-dev-67b2e30eb7b346db60afe91b0927738fb604d0a4.tar.gz
selftests: intel_pstate: build only on x86
These tests are only for x86, so don't try to build or run them on other architectures. Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools/testing/selftests')
-rw-r--r--tools/testing/selftests/intel_pstate/Makefile2
-rwxr-xr-xtools/testing/selftests/intel_pstate/run.sh5
2 files changed, 7 insertions, 0 deletions
diff --git a/tools/testing/selftests/intel_pstate/Makefile b/tools/testing/selftests/intel_pstate/Makefile
index 849a90f..a97e24e 100644
--- a/tools/testing/selftests/intel_pstate/Makefile
+++ b/tools/testing/selftests/intel_pstate/Makefile
@@ -1,7 +1,9 @@
CFLAGS := $(CFLAGS) -Wall -D_GNU_SOURCE
LDLIBS := $(LDLIBS) -lm
+ifeq (,$(filter $(ARCH),x86))
TEST_GEN_FILES := msr aperf
+endif
TEST_PROGS := run.sh
diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/selftests/intel_pstate/run.sh
index 7868c10..1b4b830 100755
--- a/tools/testing/selftests/intel_pstate/run.sh
+++ b/tools/testing/selftests/intel_pstate/run.sh
@@ -29,6 +29,11 @@
EVALUATE_ONLY=0
+if ! uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ | grep -q x86; then
+ echo "$0 # Skipped: Test can only run on x86 architectures."
+ exit 0
+fi
+
max_cpus=$(($(nproc)-1))
# compile programs
OpenPOWER on IntegriCloud