source: rtems/testsuites/automake/subdirs.am @ 30eeb0d

5
Last change on this file since 30eeb0d was 30eeb0d, checked in by Chris Johns <chrisj@…>, on 05/25/17 at 05:11:45

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.

  • Property mode set to 100644
File size: 1.6 KB
Line 
1## Borrowed from automake/subdir.am which borrowed automake-1.4 and adapted to RTEMS
2
3## NOTE: This is a temporary work-around until automake is removed from RTEMS.
4##   It is a hack within many hacks and is designed to keep the source as clean
5##   as possible.
6
7define TESTDIR
8.PHONY: $1
9$1:
10        @+set fnord $(MAKEFLAGS); \
11        if test "$(1)" != "."; then \
12          target=`echo $(MAKECMDGOALS) | sed s/-recursive//`; \
13          if test "$$$$target" = "all-local-am"; then \
14            target="all-am"; \
15          fi; \
16          if test "$$$$target" = "all-local"; then \
17            target="all"; \
18          fi; \
19          tcheck="$(top_srcdir)/../../tools/build/rtems-test-check-py"; \
20          tdata="$(RTEMS_BSP)-testsuite.tcfg"; \
21          tincludes="$(top_srcdir)/../../c/src/lib/libbsp/$(RTEMS_CPU)/$(RTEMS_BSP_FAMILY)/make/custom:$(top_srcdir)/.."; \
22          if test -f $$$$tcheck; then \
23            check_result=`$$$$tcheck exclude $(RTEMS_BSP) $$$$tdata $$$$tincludes $(1)`; \
24          else \
25            check_result="$(1)"; \
26          fi; \
27          if test "$(1)" = "$$$$check_result"; then \
28            if test -f $$$$tcheck; then \
29              test_FLAGS=`$$$$tcheck flags $(RTEMS_BSP) $$$$tdata $$$$tincludes $(1)`; \
30            fi; \
31            local_target="$$$$target"; \
32            if test -z "$$$$test_FLAGS"; then \
33              echo "BSP Testsuite: $(1): PASS"; \
34            else \
35              echo "BSP Testsuite: $(1): $$$$test_FLAGS"; \
36            fi; \
37            echo "Making $$$$target in $(1)"; \
38            cd $(1); \
39            $(MAKE) $(AM_MAKEFLAGS) TEST_FLAGS="$$$$test_FLAGS" $$$$local_target; \
40          else \
41            echo "BSP Testsuite: $(1): EXCLUDED"; \
42          fi; \
43        fi;
44endef
45
46$(foreach T,$(_SUBDIRS),$(eval $(call TESTDIR,$(strip $(T)))))
47
48all-local:  $(_SUBDIRS)
Note: See TracBrowser for help on using the repository browser.