[rtems commit] Backport capability to exclude tests from building

Chris Johns chrisj at rtems.org
Tue Sep 6 00:32:06 UTC 2016


Module:    rtems
Branch:    4.10
Commit:    85910040d8bc7b2031656372042cf993caa90a86
Changeset: http://git.rtems.org/rtems/commit/?id=85910040d8bc7b2031656372042cf993caa90a86

Author:    Joel Sherrill <joel at rtems.org>
Date:      Mon Sep  5 17:42:27 2016 -0500

Backport capability to exclude tests from building

Backported build infrastructure and .tcfg files from master.

---

 .../make/custom/arm1136jfs-testsuite.tcfg          |  5 ++++
 .../gdbarmsim/make/custom/arm1136js-testsuite.tcfg |  5 ++++
 .../gdbarmsim/make/custom/arm7tdmi-testsuite.tcfg  |  5 ++++
 .../gdbarmsim/make/custom/arm920-testsuite.tcfg    |  5 ++++
 .../make/custom/armcortexa9-testsuite.tcfg         |  5 ++++
 .../arm/lpc24xx/make/custom/lpc2362-testsuite.tcfg | 10 +++++++
 .../h8300/h8sim/make/custom/h8sxsim-testsuite.tcfg |  8 +++++
 .../m32cbsp/make/custom/m32csim-testsuite.tcfg     |  7 +++++
 .../mcf52235/make/custom/mcf52235-testsuite.tcfg   |  5 ++++
 .../mcf5225x/make/custom/mcf5225x-testsuite.tcfg   |  5 ++++
 .../sh/shsim/make/custom/simsh1-testsuite.tcfg     | 11 +++++++
 .../sh/shsim/make/custom/simsh2-testsuite.tcfg     | 11 +++++++
 .../sh/shsim/make/custom/simsh2e-testsuite.tcfg    | 10 +++++++
 .../sh/shsim/make/custom/simsh4-testsuite.tcfg     | 10 +++++++
 testsuites/automake/test-subdirs.am                | 35 ++++++++++++++++++++++
 testsuites/itrontests/Makefile.am                  |  4 +--
 testsuites/libtests/Makefile.am                    | 12 ++++----
 testsuites/mptests/Makefile.am                     |  4 +--
 testsuites/mptests/mp02/Makefile.am                |  2 +-
 testsuites/psxtests/Makefile.am                    | 10 +++----
 testsuites/samples/Makefile.am                     | 16 +++++-----
 testsuites/sptests/Makefile.am                     |  6 ++--
 .../testdata/disable-intrcritical-tests.tcfg       | 30 +++++++++++++++++++
 testsuites/tmitrontests/Makefile.am                |  4 +--
 testsuites/tmtests/Makefile.am                     |  4 +--
 tools/build/rtems-test-check                       |  3 +-
 26 files changed, 199 insertions(+), 33 deletions(-)

diff --git a/c/src/lib/libbsp/arm/gdbarmsim/make/custom/arm1136jfs-testsuite.tcfg b/c/src/lib/libbsp/arm/gdbarmsim/make/custom/arm1136jfs-testsuite.tcfg
new file mode 100644
index 0000000..70a1a31
--- /dev/null
+++ b/c/src/lib/libbsp/arm/gdbarmsim/make/custom/arm1136jfs-testsuite.tcfg
@@ -0,0 +1,5 @@
+#
+# The GDB ARM Simulator does not have a tick interrupt.
+#
+
+include: testdata/require-tick-isr.tcfg
diff --git a/c/src/lib/libbsp/arm/gdbarmsim/make/custom/arm1136js-testsuite.tcfg b/c/src/lib/libbsp/arm/gdbarmsim/make/custom/arm1136js-testsuite.tcfg
new file mode 100644
index 0000000..70a1a31
--- /dev/null
+++ b/c/src/lib/libbsp/arm/gdbarmsim/make/custom/arm1136js-testsuite.tcfg
@@ -0,0 +1,5 @@
+#
+# The GDB ARM Simulator does not have a tick interrupt.
+#
+
+include: testdata/require-tick-isr.tcfg
diff --git a/c/src/lib/libbsp/arm/gdbarmsim/make/custom/arm7tdmi-testsuite.tcfg b/c/src/lib/libbsp/arm/gdbarmsim/make/custom/arm7tdmi-testsuite.tcfg
new file mode 100644
index 0000000..70a1a31
--- /dev/null
+++ b/c/src/lib/libbsp/arm/gdbarmsim/make/custom/arm7tdmi-testsuite.tcfg
@@ -0,0 +1,5 @@
+#
+# The GDB ARM Simulator does not have a tick interrupt.
+#
+
+include: testdata/require-tick-isr.tcfg
diff --git a/c/src/lib/libbsp/arm/gdbarmsim/make/custom/arm920-testsuite.tcfg b/c/src/lib/libbsp/arm/gdbarmsim/make/custom/arm920-testsuite.tcfg
new file mode 100644
index 0000000..70a1a31
--- /dev/null
+++ b/c/src/lib/libbsp/arm/gdbarmsim/make/custom/arm920-testsuite.tcfg
@@ -0,0 +1,5 @@
+#
+# The GDB ARM Simulator does not have a tick interrupt.
+#
+
+include: testdata/require-tick-isr.tcfg
diff --git a/c/src/lib/libbsp/arm/gdbarmsim/make/custom/armcortexa9-testsuite.tcfg b/c/src/lib/libbsp/arm/gdbarmsim/make/custom/armcortexa9-testsuite.tcfg
new file mode 100644
index 0000000..70a1a31
--- /dev/null
+++ b/c/src/lib/libbsp/arm/gdbarmsim/make/custom/armcortexa9-testsuite.tcfg
@@ -0,0 +1,5 @@
+#
+# The GDB ARM Simulator does not have a tick interrupt.
+#
+
+include: testdata/require-tick-isr.tcfg
diff --git a/c/src/lib/libbsp/arm/lpc24xx/make/custom/lpc2362-testsuite.tcfg b/c/src/lib/libbsp/arm/lpc24xx/make/custom/lpc2362-testsuite.tcfg
new file mode 100644
index 0000000..a0b12f0
--- /dev/null
+++ b/c/src/lib/libbsp/arm/lpc24xx/make/custom/lpc2362-testsuite.tcfg
@@ -0,0 +1,10 @@
+#
+# The LPC2362 does not have enough memory for some tests to link.
+#
+
+cdtest
+fileio
+flashdisk01
+psx07
+rtems++
+sp09
diff --git a/c/src/lib/libbsp/h8300/h8sim/make/custom/h8sxsim-testsuite.tcfg b/c/src/lib/libbsp/h8300/h8sim/make/custom/h8sxsim-testsuite.tcfg
new file mode 100644
index 0000000..12ea666
--- /dev/null
+++ b/c/src/lib/libbsp/h8300/h8sim/make/custom/h8sxsim-testsuite.tcfg
@@ -0,0 +1,8 @@
+#
+#  Tests to skip for h8sxsim BSP
+#
+
+include: testdata/require-tick-isr.tcfg
+include: testdata/disable-intrcritical-tests.tcfg
+
+flashdisk01
diff --git a/c/src/lib/libbsp/m32c/m32cbsp/make/custom/m32csim-testsuite.tcfg b/c/src/lib/libbsp/m32c/m32cbsp/make/custom/m32csim-testsuite.tcfg
new file mode 100644
index 0000000..949e1b1
--- /dev/null
+++ b/c/src/lib/libbsp/m32c/m32cbsp/make/custom/m32csim-testsuite.tcfg
@@ -0,0 +1,7 @@
+#
+# The GDB M32C Simulator does not have a tick interrupt.
+#
+
+include: testdata/require-tick-isr.tcfg
+
+fileio
diff --git a/c/src/lib/libbsp/m68k/mcf52235/make/custom/mcf52235-testsuite.tcfg b/c/src/lib/libbsp/m68k/mcf52235/make/custom/mcf52235-testsuite.tcfg
new file mode 100644
index 0000000..dc88198
--- /dev/null
+++ b/c/src/lib/libbsp/m68k/mcf52235/make/custom/mcf52235-testsuite.tcfg
@@ -0,0 +1,5 @@
+#
+#  Tests to avoid for the mcf5235 BSP
+#
+
+flashdisk01
diff --git a/c/src/lib/libbsp/m68k/mcf5225x/make/custom/mcf5225x-testsuite.tcfg b/c/src/lib/libbsp/m68k/mcf5225x/make/custom/mcf5225x-testsuite.tcfg
new file mode 100644
index 0000000..f77a96e
--- /dev/null
+++ b/c/src/lib/libbsp/m68k/mcf5225x/make/custom/mcf5225x-testsuite.tcfg
@@ -0,0 +1,5 @@
+#
+# tests to avoid for the mcf5225x BSP
+#
+
+flashdisk01
diff --git a/c/src/lib/libbsp/sh/shsim/make/custom/simsh1-testsuite.tcfg b/c/src/lib/libbsp/sh/shsim/make/custom/simsh1-testsuite.tcfg
new file mode 100644
index 0000000..eb120d9
--- /dev/null
+++ b/c/src/lib/libbsp/sh/shsim/make/custom/simsh1-testsuite.tcfg
@@ -0,0 +1,11 @@
+#
+# simsh1 RTEMS Test Database.
+#
+# Format is one line per test that is _NOT_ built.
+#
+
+include: testdata/require-tick-isr.tcfg
+include: testdata/disable-intrcritical-tests.tcfg
+
+fileio
+iostream
diff --git a/c/src/lib/libbsp/sh/shsim/make/custom/simsh2-testsuite.tcfg b/c/src/lib/libbsp/sh/shsim/make/custom/simsh2-testsuite.tcfg
new file mode 100644
index 0000000..c66569c
--- /dev/null
+++ b/c/src/lib/libbsp/sh/shsim/make/custom/simsh2-testsuite.tcfg
@@ -0,0 +1,11 @@
+#
+# simsh2 RTEMS Test Database.
+#
+# Format is one line per test that is _NOT_ built.
+#
+
+include: testdata/require-tick-isr.tcfg
+include: testdata/disable-intrcritical-tests.tcfg
+
+fileio
+iostream
diff --git a/c/src/lib/libbsp/sh/shsim/make/custom/simsh2e-testsuite.tcfg b/c/src/lib/libbsp/sh/shsim/make/custom/simsh2e-testsuite.tcfg
new file mode 100644
index 0000000..9d84af2
--- /dev/null
+++ b/c/src/lib/libbsp/sh/shsim/make/custom/simsh2e-testsuite.tcfg
@@ -0,0 +1,10 @@
+#
+# The GDB SH Simulator does not have a tick interrupt
+# and the simsh2e configuration has limited memory.
+#
+
+include: testdata/require-tick-isr.tcfg
+include: testdata/disable-intrcritical-tests.tcfg
+
+fileio
+iostream
diff --git a/c/src/lib/libbsp/sh/shsim/make/custom/simsh4-testsuite.tcfg b/c/src/lib/libbsp/sh/shsim/make/custom/simsh4-testsuite.tcfg
new file mode 100644
index 0000000..3aaf7f6
--- /dev/null
+++ b/c/src/lib/libbsp/sh/shsim/make/custom/simsh4-testsuite.tcfg
@@ -0,0 +1,10 @@
+#
+# The GDB SH Simulator does not have a tick interrupt
+# and the simsh4 configuration has limited memory.
+#
+
+include: testdata/require-tick-isr.tcfg
+include: testdata/disable-intrcritical-tests.tcfg
+
+fileio
+iostream
diff --git a/testsuites/automake/test-subdirs.am b/testsuites/automake/test-subdirs.am
new file mode 100644
index 0000000..ff339aa
--- /dev/null
+++ b/testsuites/automake/test-subdirs.am
@@ -0,0 +1,35 @@
+## 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; \
+	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.cfg"; \
+	 else \
+	  vtdata="all tests"; \
+	fi; \
+	echo "BSP Testsuite Data: $$vtdata"; \
+	list=`$(top_srcdir)/../../tools/build/rtems-test-check \
+		 $$tdata $(top_srcdir)/.. $(RTEMS_BSP) $(_SUBDIRS)`; \
+	for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" != "."; then \
+	    local_target="$$target"; \
+	    (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	     || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	  fi; \
+	done; test -z "$$fail"
+
+include $(top_srcdir)/../automake/subdirs.am
diff --git a/testsuites/itrontests/Makefile.am b/testsuites/itrontests/Makefile.am
index 05629b1..4cc995f 100644
--- a/testsuites/itrontests/Makefile.am
+++ b/testsuites/itrontests/Makefile.am
@@ -4,8 +4,8 @@
 
 ACLOCAL_AMFLAGS = -I ../aclocal
 
-SUBDIRS = itronhello itrontask01 itrontask02 itrontask03 itrontask04 \
+_SUBDIRS = itronhello itrontask01 itrontask02 itrontask03 itrontask04 \
     itronmbf01 itronmbox01 itronsem01 itrontime01
 
-include $(top_srcdir)/../automake/subdirs.am
+include $(top_srcdir)/../automake/test-subdirs.am
 include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/libtests/Makefile.am b/testsuites/libtests/Makefile.am
index f55a374..d4efc5b 100644
--- a/testsuites/libtests/Makefile.am
+++ b/testsuites/libtests/Makefile.am
@@ -4,15 +4,15 @@
 
 ACLOCAL_AMFLAGS = -I ../aclocal
 
-SUBDIRS = POSIX
-SUBDIRS += block12
-SUBDIRS += flashdisk01
+_SUBDIRS = POSIX
+_SUBDIRS += block12
+_SUBDIRS += flashdisk01
 
-SUBDIRS += bspcmdline01 cpuuse malloctest heapwalk putenvtest monitor \
+_SUBDIRS += bspcmdline01 cpuuse malloctest heapwalk putenvtest monitor \
     monitor02 rtmonuse stackchk stackchk01 termios termios01 termios02 \
     rtems++ tztest block01 block02 block03 block04 block05 block06 block07 \
     block08 block09 block10 stringto01
-SUBDIRS += math mathf
+_SUBDIRS += math mathf
 
-include $(top_srcdir)/../automake/subdirs.am
+include $(top_srcdir)/../automake/test-subdirs.am
 include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/mptests/Makefile.am b/testsuites/mptests/Makefile.am
index 9afef15..ba0c432 100644
--- a/testsuites/mptests/Makefile.am
+++ b/testsuites/mptests/Makefile.am
@@ -4,8 +4,8 @@
 
 ACLOCAL_AMFLAGS = -I ../aclocal
 
-SUBDIRS = mp01 mp02 mp03 mp04 mp05 mp06 mp07 mp08 mp09 mp10 mp11 mp12 mp13 \
+_SUBDIRS = mp01 mp02 mp03 mp04 mp05 mp06 mp07 mp08 mp09 mp10 mp11 mp12 mp13 \
     mp14
 
-include $(top_srcdir)/../automake/subdirs.am
+include $(top_srcdir)/../automake/test-subdirs.am
 include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/mptests/mp02/Makefile.am b/testsuites/mptests/mp02/Makefile.am
index 4665714..a9fcd4a 100644
--- a/testsuites/mptests/mp02/Makefile.am
+++ b/testsuites/mptests/mp02/Makefile.am
@@ -4,5 +4,5 @@
 
 SUBDIRS = node1 node2
 
-include $(top_srcdir)/../automake/subdirs.am
+include $(top_srcdir)/../automake/test-subdirs.am
 include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index b2bfb87..b0a68c5 100644
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -4,9 +4,9 @@
 
 ACLOCAL_AMFLAGS = -I ../aclocal
 
-SUBDIRS = psxclock
+_SUBDIRS = psxclock
 if HAS_POSIX
-SUBDIRS += psxhdrs psx01 psx02 psx03 psx04 psx05 psx06 psx07 psx08 psx09 \
+_SUBDIRS += psxhdrs psx01 psx02 psx03 psx04 psx05 psx06 psx07 psx08 psx09 \
     psx10 psx11 psx12 psx13 psx14 psx16 psxalarm01 \
     psxautoinit01 psxautoinit02 psxbarrier01 \
     psxcancel psxcancel01 psxcleanup psxcleanup01 \
@@ -19,18 +19,18 @@ SUBDIRS += psxhdrs psx01 psx02 psx03 psx04 psx05 psx06 psx07 psx08 psx09 \
 endif
 
 ## File IO tests
-SUBDIRS += psxfile01 psxreaddir psxstat psxmount psx13 psxchroot01 \
+_SUBDIRS += psxfile01 psxreaddir psxstat psxmount psx13 psxchroot01 \
   psxpasswd01
 
 ## Until sys/uio.h is moved to libcsupport, we have to have networking
 ## enabled to support readv and writev.  Hopefully this is a temporary
 ## situation.
 ## if NEWLIB
-SUBDIRS += psxrdwrv
+_SUBDIRS += psxrdwrv
 ## endif
 
 DIST_SUBDIRS = $(SUBDIRS) psxfatal_support
 EXTRA_DIST = psxfatal_support/init.c psxfatal_support/system.h
 
-include $(top_srcdir)/../automake/subdirs.am
+include $(top_srcdir)/../automake/test-subdirs.am
 include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/samples/Makefile.am b/testsuites/samples/Makefile.am
index 82560d1..a0532aa 100644
--- a/testsuites/samples/Makefile.am
+++ b/testsuites/samples/Makefile.am
@@ -4,26 +4,26 @@
 
 ACLOCAL_AMFLAGS = -I ../aclocal
 
-SUBDIRS = hello capture ticker base_sp unlimited minimum fileio
+_SUBDIRS = hello capture ticker base_sp unlimited minimum fileio
 
 if MPTESTS
 ## base_mp is a sample multiprocessing test
-SUBDIRS += base_mp
+_SUBDIRS += base_mp
 endif
 
-SUBDIRS += paranoia
+_SUBDIRS += paranoia
 
-SUBDIRS += nsecs
+_SUBDIRS += nsecs
 
 if CXXTESTS
-SUBDIRS += iostream cdtest
+_SUBDIRS += iostream cdtest
 endif
 
 if NETTESTS
 ## loopback tests a network loopback interface
-SUBDIRS += loopback
-SUBDIRS += pppd
+_SUBDIRS += loopback
+_SUBDIRS += pppd
 endif
 
-include $(top_srcdir)/../automake/subdirs.am
+include $(top_srcdir)/../automake/test-subdirs.am
 include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index 9f34253..d17ffed 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -6,7 +6,7 @@ ACLOCAL_AMFLAGS = -I ../aclocal
 
 ## Test names are spaced to indicate gaps in numbering from tests being
 ## deleted over the years.
-SUBDIRS = \
+_SUBDIRS = \
          sp01 sp02 sp03 sp04 sp05 sp06 sp07 sp08 sp09 \
     sp10 sp11 sp12 sp13 sp14 sp15 sp16 sp17 sp18 sp19 \
     sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 sp27a sp28 sp29 \
@@ -24,8 +24,8 @@ SUBDIRS = \
     spintrcritical13 spintrcritical14 spintrcritical15 spintrcritical16 \
     spintrcritical17
  
-DIST_SUBDIRS = $(SUBDIRS) spfatal_support spintrcritical_support
+DIST_SUBDIRS = $(_SUBDIRS) spfatal_support spintrcritical_support
 EXTRA_DIST = spfatal_support/init.c spfatal_support/system.h
 
-include $(top_srcdir)/../automake/subdirs.am
+include $(top_srcdir)/../automake/test-subdirs.am
 include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/testdata/disable-intrcritical-tests.tcfg b/testsuites/testdata/disable-intrcritical-tests.tcfg
new file mode 100644
index 0000000..ef36333
--- /dev/null
+++ b/testsuites/testdata/disable-intrcritical-tests.tcfg
@@ -0,0 +1,30 @@
+#
+# These tests are generally unreliable on many simulators. The
+# simulation of interrupts is not accurate enough for these tests
+# to be reliable.
+#
+
+psxintrcritical01
+spintrcritical01
+spintrcritical02
+spintrcritical03
+spintrcritical04
+spintrcritical05
+spintrcritical06
+spintrcritical07
+spintrcritical08
+spintrcritical09
+spintrcritical10
+spintrcritical11
+spintrcritical12
+spintrcritical13
+spintrcritical14
+spintrcritical15
+spintrcritical16
+spintrcritical17
+spintrcritical18
+spintrcritical20
+spintrcritical21
+spintrcritical22
+spintrcritical23
+
diff --git a/testsuites/tmitrontests/Makefile.am b/testsuites/tmitrontests/Makefile.am
index 3c8833d..f7ad5e3 100644
--- a/testsuites/tmitrontests/Makefile.am
+++ b/testsuites/tmitrontests/Makefile.am
@@ -6,7 +6,7 @@ ACLOCAL_AMFLAGS = -I ../aclocal
 
 noinst_HEADERS = include/timesys.h
 
-SUBDIRS = tmitronsem01
+_SUBDIRS = tmitronsem01
 
-include $(top_srcdir)/../automake/subdirs.am
+include $(top_srcdir)/../automake/test-subdirs.am
 include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/tmtests/Makefile.am b/testsuites/tmtests/Makefile.am
index 8b1f427..1884c67 100644
--- a/testsuites/tmtests/Makefile.am
+++ b/testsuites/tmtests/Makefile.am
@@ -4,9 +4,9 @@
 
 ACLOCAL_AMFLAGS = -I ../aclocal
 
-SUBDIRS = tmck tmoverhd tm01 tm02 tm03 tm04 tm05 tm06 tm07 tm08 tm09 tm10 \
+_SUBDIRS = tmck tmoverhd tm01 tm02 tm03 tm04 tm05 tm06 tm07 tm08 tm09 tm10 \
     tm11 tm12 tm13 tm14 tm15 tm16 tm17 tm18 tm19 tm20 tm21 tm22 tm23 tm24 \
     tm25 tm26 tm27 tm28 tm29
 
-include $(top_srcdir)/../automake/subdirs.am
+include $(top_srcdir)/../automake/test-subdirs.am
 include $(top_srcdir)/../automake/local.am
diff --git a/tools/build/rtems-test-check b/tools/build/rtems-test-check
index 3a485c7..3f53a96 100755
--- a/tools/build/rtems-test-check
+++ b/tools/build/rtems-test-check
@@ -28,7 +28,7 @@ bsp_tests=${tests}
 
 if test -f $testdata; then
   disabled_tests=""
-  while [ ! -z $testdata ];
+  while [ ! -z "$testdata" ];
   do
     for td in $testdata;
     do
@@ -73,4 +73,3 @@ fi
 echo ${bsp_tests}
 
 exit 0
-




More information about the vc mailing list