diff --git a/tools/testing/selftests/thermal/intel/power_floor/Makefile b/tools/testing/selftests/thermal/intel/power_floor/Makefile index 07463c2160e0..16d26eab5565 100644 --- a/tools/testing/selftests/thermal/intel/power_floor/Makefile +++ b/tools/testing/selftests/thermal/intel/power_floor/Makefile @@ -1,12 +1,10 @@ # SPDX-License-Identifier: GPL-2.0 -ifndef CROSS_COMPILE -ARCH ?= $(shell uname -m 2>/dev/null || echo not) -override ARCH := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/) +top_srcdir = ../../../../../.. +include $(top_srcdir)/scripts/subarch.include +ARCH_PROCESSED := $(shell echo $(or $(ARCH),$(SUBARCH)) | sed -e s/i.86/x86/ -e s/x86_64/x86/) -ifeq ($(ARCH),x86) +ifeq ($(ARCH_PROCESSED),x86) TEST_GEN_PROGS := power_floor_test +endif include ../../../lib.mk - -endif -endif diff --git a/tools/testing/selftests/thermal/intel/workload_hint/Makefile b/tools/testing/selftests/thermal/intel/workload_hint/Makefile index 49e3bc2b20f9..e53d6ecd9f8d 100644 --- a/tools/testing/selftests/thermal/intel/workload_hint/Makefile +++ b/tools/testing/selftests/thermal/intel/workload_hint/Makefile @@ -1,12 +1,10 @@ # SPDX-License-Identifier: GPL-2.0 -ifndef CROSS_COMPILE -ARCH ?= $(shell uname -m 2>/dev/null || echo not) -override ARCH := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/) +top_srcdir = ../../../../../.. +include $(top_srcdir)/scripts/subarch.include +ARCH_PROCESSED := $(shell echo $(or $(ARCH),$(SUBARCH)) | sed -e s/i.86/x86/ -e s/x86_64/x86/) -ifeq ($(ARCH),x86) +ifeq ($(ARCH_PROCESSED),x86) TEST_GEN_PROGS := workload_hint_test +endif include ../../../lib.mk - -endif -endif