2018-06-14 06:20:52 +08:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
selftests: sparc64: Fix to do nothing on non-sparc64
sparc64 test fails with the following errors on non-sparc64 systems. Fix
the Makefile to do nothing on non-sparc64 systems to suppress the errors:
make run_tests
adi-test.c: Assembler messages:
adi-test.c:302: Error: no such instruction: `rd %tick,%r13'
adi-test.c:304: Error: no such instruction: `rd %tick,%rbp'
adi-test.c:190: Error: no such instruction: `rd %tick,%rbp'
adi-test.c:192: Error: no such instruction: `rd %tick,%rdx'
adi-test.c:273: Error: no such instruction: `rd %tick,%rbx'
adi-test.c:276: Error: no such instruction: `rd %tick,%rdx'
adi-test.c:217: Error: no such instruction: `rd %tick,%rbp'
adi-test.c:220: Error: no such instruction: `rd %tick,%rdx'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:246: Error: no such instruction: `rd %tick,%rbp'
adi-test.c:248: Error: no such instruction: `rd %tick,%rdx'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
<builtin>: recipe for target 'adi-test' failed
make[1]: *** [adi-test] Error 1
adi: [FAIL]
./drivers_test.sh: 24: ./drivers_test.sh: ./adi-test: not found
../lib.mk:73: recipe for target 'run_tests' failed
make: *** [run_tests] Error 1
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Reviewed-by: Tom Hromatka <tom.hromatka@oracle.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-06-13 06:50:37 +08:00
|
|
|
uname_M := $(shell uname -m 2>/dev/null || echo not)
|
|
|
|
ARCH ?= $(shell echo $(uname_M) | sed -e s/x86_64/x86/)
|
|
|
|
|
|
|
|
ifneq ($(ARCH),sparc64)
|
|
|
|
nothing:
|
|
|
|
.PHONY: all clean run_tests install
|
|
|
|
.SILENT:
|
|
|
|
else
|
|
|
|
|
2018-04-27 00:54:09 +08:00
|
|
|
SUBDIRS := drivers
|
|
|
|
|
|
|
|
TEST_PROGS := run.sh
|
|
|
|
|
selftests: sparc64: Fix to do nothing on non-sparc64
sparc64 test fails with the following errors on non-sparc64 systems. Fix
the Makefile to do nothing on non-sparc64 systems to suppress the errors:
make run_tests
adi-test.c: Assembler messages:
adi-test.c:302: Error: no such instruction: `rd %tick,%r13'
adi-test.c:304: Error: no such instruction: `rd %tick,%rbp'
adi-test.c:190: Error: no such instruction: `rd %tick,%rbp'
adi-test.c:192: Error: no such instruction: `rd %tick,%rdx'
adi-test.c:273: Error: no such instruction: `rd %tick,%rbx'
adi-test.c:276: Error: no such instruction: `rd %tick,%rdx'
adi-test.c:217: Error: no such instruction: `rd %tick,%rbp'
adi-test.c:220: Error: no such instruction: `rd %tick,%rdx'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:246: Error: no such instruction: `rd %tick,%rbp'
adi-test.c:248: Error: no such instruction: `rd %tick,%rdx'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
<builtin>: recipe for target 'adi-test' failed
make[1]: *** [adi-test] Error 1
adi: [FAIL]
./drivers_test.sh: 24: ./drivers_test.sh: ./adi-test: not found
../lib.mk:73: recipe for target 'run_tests' failed
make: *** [run_tests] Error 1
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Reviewed-by: Tom Hromatka <tom.hromatka@oracle.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-06-13 06:50:37 +08:00
|
|
|
|
2018-04-27 00:54:09 +08:00
|
|
|
.PHONY: all clean
|
|
|
|
|
|
|
|
include ../lib.mk
|
|
|
|
|
|
|
|
all:
|
|
|
|
@for DIR in $(SUBDIRS); do \
|
|
|
|
BUILD_TARGET=$(OUTPUT)/$$DIR; \
|
|
|
|
mkdir $$BUILD_TARGET -p; \
|
|
|
|
make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
|
|
|
|
#SUBDIR test prog name should be in the form: SUBDIR_test.sh \
|
|
|
|
TEST=$$DIR"_test.sh"; \
|
|
|
|
if [ -e $$DIR/$$TEST ]; then \
|
|
|
|
rsync -a $$DIR/$$TEST $$BUILD_TARGET/; \
|
|
|
|
fi \
|
|
|
|
done
|
|
|
|
|
|
|
|
override define INSTALL_RULE
|
|
|
|
mkdir -p $(INSTALL_PATH)
|
|
|
|
install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
|
|
|
|
|
|
|
|
@for SUBDIR in $(SUBDIRS); do \
|
|
|
|
BUILD_TARGET=$(OUTPUT)/$$SUBDIR; \
|
|
|
|
mkdir $$BUILD_TARGET -p; \
|
|
|
|
$(MAKE) OUTPUT=$$BUILD_TARGET -C $$SUBDIR INSTALL_PATH=$(INSTALL_PATH)/$$SUBDIR install; \
|
|
|
|
done;
|
|
|
|
endef
|
|
|
|
|
|
|
|
override define CLEAN
|
|
|
|
@for DIR in $(SUBDIRS); do \
|
|
|
|
BUILD_TARGET=$(OUTPUT)/$$DIR; \
|
|
|
|
mkdir $$BUILD_TARGET -p; \
|
|
|
|
make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
|
|
|
|
done
|
|
|
|
endef
|
selftests: sparc64: Fix to do nothing on non-sparc64
sparc64 test fails with the following errors on non-sparc64 systems. Fix
the Makefile to do nothing on non-sparc64 systems to suppress the errors:
make run_tests
adi-test.c: Assembler messages:
adi-test.c:302: Error: no such instruction: `rd %tick,%r13'
adi-test.c:304: Error: no such instruction: `rd %tick,%rbp'
adi-test.c:190: Error: no such instruction: `rd %tick,%rbp'
adi-test.c:192: Error: no such instruction: `rd %tick,%rdx'
adi-test.c:273: Error: no such instruction: `rd %tick,%rbx'
adi-test.c:276: Error: no such instruction: `rd %tick,%rdx'
adi-test.c:217: Error: no such instruction: `rd %tick,%rbp'
adi-test.c:220: Error: no such instruction: `rd %tick,%rdx'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:246: Error: no such instruction: `rd %tick,%rbp'
adi-test.c:248: Error: no such instruction: `rd %tick,%rdx'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
<builtin>: recipe for target 'adi-test' failed
make[1]: *** [adi-test] Error 1
adi: [FAIL]
./drivers_test.sh: 24: ./drivers_test.sh: ./adi-test: not found
../lib.mk:73: recipe for target 'run_tests' failed
make: *** [run_tests] Error 1
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Reviewed-by: Tom Hromatka <tom.hromatka@oracle.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-06-13 06:50:37 +08:00
|
|
|
endif
|