selftests: intel_pstate: build only on x86
authorDaniel Díaz <daniel.diaz@linaro.org>
Thu, 17 Aug 2017 15:55:30 +0000 (10:55 -0500)
committerShuah Khan <shuahkh@osg.samsung.com>
Mon, 18 Sep 2017 16:54:14 +0000 (10:54 -0600)
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>
tools/testing/selftests/intel_pstate/Makefile
tools/testing/selftests/intel_pstate/run.sh

index 849a90ffe8dd2d311b9b66bed9058fefdf28ba7d..a97e24edde39ed9d9d51441b01547856641b9606 100644 (file)
@@ -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
 
index 7868c106b8b1b80c41a8af739c8def48fd378bd8..1b4b8302dfc20fd41d3bf4840c2c49cce5ee7237 100755 (executable)
 
 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