From 30eeb0d15ac874d2ef0f92afeb757e65ff398e77 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Thu, 25 May 2017 15:11:45 +1000 Subject: testsuite: Fix excluding tests that a substring of another test. Fix excluding `math` when there is a test `mathl`. The shell test used fails in this case. This patch's approach is much simpler. --- testsuites/automake/subdirs.am | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/testsuites/automake/subdirs.am b/testsuites/automake/subdirs.am index 56e1ec560f..f4152e56f2 100644 --- a/testsuites/automake/subdirs.am +++ b/testsuites/automake/subdirs.am @@ -8,8 +8,7 @@ define TESTDIR .PHONY: $1 $1: @+set fnord $(MAKEFLAGS); \ - subdir=$(1); \ - if test "$$$$subdir" != "."; then \ + if test "$(1)" != "."; then \ target=`echo $(MAKECMDGOALS) | sed s/-recursive//`; \ if test "$$$$target" = "all-local-am"; then \ target="all-am"; \ @@ -21,25 +20,25 @@ $1: tdata="$(RTEMS_BSP)-testsuite.tcfg"; \ tincludes="$(top_srcdir)/../../c/src/lib/libbsp/$(RTEMS_CPU)/$(RTEMS_BSP_FAMILY)/make/custom:$(top_srcdir)/.."; \ if test -f $$$$tcheck; then \ - list=`$$$$tcheck exclude $(RTEMS_BSP) $$$$tdata $$$$tincludes $(_SUBDIRS)`; \ + check_result=`$$$$tcheck exclude $(RTEMS_BSP) $$$$tdata $$$$tincludes $(1)`; \ else \ - list=; \ + check_result="$(1)"; \ fi; \ - if test "$$$${list#*$$$$subdir}" != "$$$$list"; then \ + if test "$(1)" = "$$$$check_result"; then \ if test -f $$$$tcheck; then \ - test_FLAGS=`$$$$tcheck flags $(RTEMS_BSP) $$$$tdata $$$$tincludes $$$$subdir`; \ + test_FLAGS=`$$$$tcheck flags $(RTEMS_BSP) $$$$tdata $$$$tincludes $(1)`; \ fi; \ local_target="$$$$target"; \ if test -z "$$$$test_FLAGS"; then \ - echo "BSP Testsuite: $$$$subdir: PASS"; \ + echo "BSP Testsuite: $(1): PASS"; \ else \ - echo "BSP Testsuite: $$$$subdir: $$$$test_FLAGS"; \ + echo "BSP Testsuite: $(1): $$$$test_FLAGS"; \ fi; \ - echo "Making $$$$target in $$$$subdir"; \ - cd $$$$subdir; \ + echo "Making $$$$target in $(1)"; \ + cd $(1); \ $(MAKE) $(AM_MAKEFLAGS) TEST_FLAGS="$$$$test_FLAGS" $$$$local_target; \ else \ - echo "BSP Testsuite: $$$$subdir: EXCLUDED"; \ + echo "BSP Testsuite: $(1): EXCLUDED"; \ fi; \ fi; endef -- cgit v1.2.3