Update the Makefiles for _16 and _64 tests in order to add them automatically to the Morello skip file if they aren't built.
This commit "works" but very crudely and has some undesired behaviors: - Tests will be appended each time the build target is ran - The skip files are modified directly in the source tree --- include/mk/env_post.mk | 2 +- testcases/kernel/syscalls/utils/compat_16.mk | 8 ++++++++ testcases/kernel/syscalls/utils/newer_64.mk | 9 +++++++++ 3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/include/mk/env_post.mk b/include/mk/env_post.mk index a00f31b08478..86c3a12f6983 100644 --- a/include/mk/env_post.mk +++ b/include/mk/env_post.mk @@ -83,7 +83,7 @@ INSTALL_MODE ?= 00775 $(abspath $(addprefix $(DESTDIR)/$(INSTALL_DIR)/,$(sort $(dir $(INSTALL_TARGETS) $(MAKE_TARGETS))))): mkdir -p "$@" $(foreach install_target,$(INSTALL_TARGETS),$(eval $(call generate_install_rule,$(install_target),$(abs_srcdir),$(INSTALL_DIR)))) -$(foreach make_target,$(MAKE_TARGETS),$(eval $(call generate_install_rule,$(make_target),$(abs_builddir),$(INSTALL_DIR)))) +$(foreach make_target,$(filter-out %.skip,$(MAKE_TARGETS)),$(eval $(call generate_install_rule,$(make_target),$(abs_builddir),$(INSTALL_DIR))))
else # else ! $(filter-out install,$(MAKECMDGOALS)),$(MAKECMDGOALS) $(error You must define $$(prefix) before executing install) diff --git a/testcases/kernel/syscalls/utils/compat_16.mk b/testcases/kernel/syscalls/utils/compat_16.mk index 71fcc4b89ca3..2eb2367e0c28 100644 --- a/testcases/kernel/syscalls/utils/compat_16.mk +++ b/testcases/kernel/syscalls/utils/compat_16.mk @@ -56,6 +56,8 @@ MAKE_TARGETS := $(notdir $(patsubst %.c,%,$(SRCS))) MAKE_TARGETS_OBJS_WO_COMPAT_16 := $(addsuffix .o,$(MAKE_TARGETS)) ifneq ($(TST_COMPAT_16_SYSCALL),no) MAKE_TARGETS += $(addsuffix _16,$(MAKE_TARGETS)) +else +MAKE_TARGETS += $(addsuffix _16.skip,$(MAKE_TARGETS)) endif
# XXX (garrcoop): This code should be put in question as it cannot be applied @@ -78,3 +80,9 @@ endif
%_16.o: %.c $(COMPAT_16_H) $(COMPILE.c) $(OUTPUT_OPTION) $< + +%_16.skip: + echo Skipping $(patsubst %.skip,%,$@) + # FIXME: How to only append once ? + # FIXME: How not to override the list in the source tree ? + echo $(patsubst %.skip,%,$@) >> $(top_srcdir)/runtest/syscalls_morello_skip diff --git a/testcases/kernel/syscalls/utils/newer_64.mk b/testcases/kernel/syscalls/utils/newer_64.mk index 5e798057a18e..cd1d453a99c7 100644 --- a/testcases/kernel/syscalls/utils/newer_64.mk +++ b/testcases/kernel/syscalls/utils/newer_64.mk @@ -31,6 +31,8 @@ MAKE_TARGETS := $(notdir $(patsubst %.c,%,$(SRCS)))
ifneq ($(TST_NEWER_64_SYSCALL),no) MAKE_TARGETS += $(addsuffix _64,$(MAKE_TARGETS)) +else +MAKE_TARGETS += $(addsuffix _64.skip,$(MAKE_TARGETS)) endif
# XXX (garrcoop): This code should be put in question as it cannot be applied @@ -53,3 +55,10 @@ endif
%_64.o: %.c $(COMPILE.c) $(OUTPUT_OPTION) $< + +%_64.skip: + echo Skipping $(patsubst %.skip,%,$@) + # FIXME: How to only append once ? + # FIXME: How not to override the list in the source tree ? + echo $(patsubst %.skip,%,$@) >> $(top_srcdir)/runtest/syscalls_morello_skip +
linux-morello-ltp@op-lists.linaro.org