summaryrefslogtreecommitdiffstats
path: root/testsuites/automake/subdirs.am
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-04-04 08:11:24 +1000
committerChris Johns <chrisj@rtems.org>2017-04-04 08:24:22 +1000
commit258bda306ba25741624488d24a2785c055a9fab0 (patch)
tree66301d9e50cf6dbc08539b441cab8b41ffe2f895 /testsuites/automake/subdirs.am
parentbsp/qoriq: Fix L1 cache flush (diff)
downloadrtems-258bda306ba25741624488d24a2785c055a9fab0.tar.bz2
testsuite: Add a common test configuration. Fix configure.ac and Makefile.am errors.
- Add a top level test configuration file for test states that are common to all BSPs. This saves adding a test configuration (tcfg) file for every BSP. - Add the test states 'user-input' and 'benchmark'. This lets 'rtems-test' stop the test rather than waiting for a timeout or letting a benchmark run without the user asking for it to run. - Implement rtems-test-check in Python to make it faster. The shell script had grown to a point it was noticably slowing the build down. - Fix the configure.ac and Makefile.am files for a number of the test directories. The files are difficiult to keep in sync with the number of tests and mistakes can happen such as tests being left out of the build. The test fsrofs01 is an example. Also a there was a mix of SUBDIRS and _SUBDIRS being used and only _SUBDIRS should be used. - Fix the test fsrofs01 so it compiles. Closes #2963.
Diffstat (limited to 'testsuites/automake/subdirs.am')
-rw-r--r--testsuites/automake/subdirs.am45
1 files changed, 45 insertions, 0 deletions
diff --git a/testsuites/automake/subdirs.am b/testsuites/automake/subdirs.am
index e69de29bb2..70a7ecb78c 100644
--- a/testsuites/automake/subdirs.am
+++ b/testsuites/automake/subdirs.am
@@ -0,0 +1,45 @@
+## Borrowed from automake/subdir.am which borrowed automake-1.4 and adapted to RTEMS
+
+## NOTE: This is a temporary work-around until automake is removed from RTEMS.
+## It is a hack within many hacks and is designed to keep the source as clean
+## as possible.
+
+all-local:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ if test "$$target" = "all-local-am"; then \
+ target="all-am"; \
+ fi; \
+ if test "$$target" = "all-local"; then \
+ target="all"; \
+ fi; \
+ tcheck="$(top_srcdir)/../../tools/build/rtems-test-check-py"; \
+ tdata="$(top_srcdir)/../../c/src/lib/libbsp/$(RTEMS_CPU)/$(RTEMS_BSP_FAMILY)/make/custom/$(RTEMS_BSP)-testsuite.tcfg"; \
+ if test -f "$$tdata"; then \
+ vtdata="$(RTEMS_CPU)/$(RTEMS_BSP_FAMILY)/make/custom/$(RTEMS_BSP)-testsuite.tcfg"; \
+ else \
+ vtdata="all tests"; \
+ fi; \
+ echo "BSP Testsuite Data: $$vtdata"; \
+ if test -f $$tcheck; then \
+ list=`$$tcheck exclude $$tdata $(top_srcdir)/.. $(RTEMS_BSP) $(_SUBDIRS)`; \
+ else \
+ list=$(_SUBDIRS); \
+ fi; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" != "."; then \
+ if test -f $$tcheck; then \
+ test_FLAGS=`$$tcheck flags $$tdata $(top_srcdir)/.. $(RTEMS_BSP) $$subdir`; \
+ fi; \
+ local_target="$$target"; \
+ if test -z "$$test_FLAGS"; then \
+ echo "BSP Testsuite Flags: $$subdir: PASS"; \
+ else \
+ echo "BSP Testsuite Flags: $$subdir: $$test_FLAGS"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) TEST_FLAGS="$$test_FLAGS" $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ fi; \
+ done; test -z "$$fail"