[PATCH] testsuites/rhealstone: Merge rhealstone into a single Makefile.am
Chris Johns
chrisj at rtems.org
Thu Apr 5 05:52:42 UTC 2018
This change is part of refactoring the testsuite's build system to
remove nested make builds for every test.
Update #3382
---
testsuites/rhealstone/Makefile.am | 67 ++++++++++++++++++++++---
testsuites/rhealstone/configure.ac | 19 +++----
testsuites/rhealstone/rhdeadlockbrk/Makefile.am | 23 ---------
testsuites/rhealstone/rhilatency/Makefile.am | 23 ---------
testsuites/rhealstone/rhmlatency/Makefile.am | 23 ---------
testsuites/rhealstone/rhsemshuffle/Makefile.am | 23 ---------
testsuites/rhealstone/rhtaskpreempt/Makefile.am | 23 ---------
testsuites/rhealstone/rhtaskswitch/Makefile.am | 23 ---------
8 files changed, 70 insertions(+), 154 deletions(-)
delete mode 100644 testsuites/rhealstone/rhdeadlockbrk/Makefile.am
delete mode 100644 testsuites/rhealstone/rhilatency/Makefile.am
delete mode 100644 testsuites/rhealstone/rhmlatency/Makefile.am
delete mode 100644 testsuites/rhealstone/rhsemshuffle/Makefile.am
delete mode 100644 testsuites/rhealstone/rhtaskpreempt/Makefile.am
delete mode 100644 testsuites/rhealstone/rhtaskswitch/Makefile.am
diff --git a/testsuites/rhealstone/Makefile.am b/testsuites/rhealstone/Makefile.am
index e2dcf694da..a6f1e22414 100644
--- a/testsuites/rhealstone/Makefile.am
+++ b/testsuites/rhealstone/Makefile.am
@@ -1,12 +1,65 @@
+#
+# Real-time Benchmarking
+#
+
ACLOCAL_AMFLAGS = -I ../aclocal
-_SUBDIRS =
-_SUBDIRS += rhdeadlockbrk
-_SUBDIRS += rhilatency
-_SUBDIRS += rhmlatency
-_SUBDIRS += rhsemshuffle
-_SUBDIRS += rhtaskpreempt
-_SUBDIRS += rhtaskswitch
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+rhealstones =
+rhealstone_screens =
+rhealstone_docs =
+
+support_includes = \
+ -I$(top_srcdir)/../tmtests/include \
+ -I$(top_srcdir)/../support/include
+
+if TEST_rhdeadlockbrk
+rhealstones += rhdeadlockbrk
+rhealstone_docs += rhdeadlockbrk/rhdeadlockbrk.adoc
+rhdeadlockbrk_SOURCES = rhdeadlockbrk/deadlockbrk.c
+rhdeadlockbrk_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_rhdeadlockbrk) $(support_includes)
+endif
+
+if TEST_rhilatency
+rhealstones += rhilatency
+rhealstone_docs += rhilatency/rhilatency.adoc
+rhilatency_SOURCES = rhilatency/ilatency.c
+rhilatency_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_rhilatency) $(support_includes)
+endif
+
+if TEST_rhmlatency
+rhealstones += rhmlatency
+rhealstone_docs += rhmlatency/rhmlatency.adoc
+rhmlatency_SOURCES = rhmlatency/mlatency.c
+rhmlatency_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_rhmlatency) $(support_includes)
+endif
+
+if TEST_rhsemshuffle
+rhealstones += rhsemshuffle
+rhealstone_docs += rhsemshuffle/rhsemshuffle.adoc
+rhsemshuffle_SOURCES = rhsemshuffle/semshuffle.c
+rhsemshuffle_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_rhsemshuffle) $(support_includes)
+endif
+
+if TEST_rhtaskpreempt
+rhealstones += rhtaskpreempt
+rhealstone_docs += rhtaskpreempt/rhtaskpreempt.adoc
+rhtaskpreempt_SOURCES = rhtaskpreempt/taskpreempt.c
+rhtaskpreempt_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_dhrystone) $(support_includes)
+endif
+
+if TEST_rhtaskswitch
+rhealstones += rhtaskswitch
+rhealstone_docs += rhtaskswitch/rhtaskswitch.adoc
+rhtaskswitch_SOURCES = rhtaskswitch/taskswitch.c
+rhtaskswitch_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_rhtaskswitch) $(support_includes)
+endif
+
+rtems_tests_PROGRAMS = $(rhealstones)
+dist_rtems_tests_DATA = $(rhealstone_screens) $(rhealstone_docs)
include $(top_srcdir)/../automake/subdirs.am
include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/rhealstone/configure.ac b/testsuites/rhealstone/configure.ac
index 9319c28a5c..5eb56d44d7 100644
--- a/testsuites/rhealstone/configure.ac
+++ b/testsuites/rhealstone/configure.ac
@@ -25,13 +25,14 @@ RTEMS_CANONICALIZE_TOOLS
RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
-# Explicitly list all Makefiles here
-AC_CONFIG_FILES([Makefile
-rhdeadlockbrk/Makefile
-rhilatency/Makefile
-rhmlatency/Makefile
-rhsemshuffle/Makefile
-rhtaskpreempt/Makefile
-rhtaskswitch/Makefile
-])
+# BSP Test configuration
+RTEMS_TEST_CHECK([rhdeadlockbrk])
+RTEMS_TEST_CHECK([rhilatency])
+RTEMS_TEST_CHECK([rhmlatency])
+RTEMS_TEST_CHECK([rhsemshuffle])
+RTEMS_TEST_CHECK([rhtaskpreempt])
+RTEMS_TEST_CHECK([rhtaskswitch])
+
+# Create output
+AC_CONFIG_FILES([Makefile])
AC_OUTPUT
diff --git a/testsuites/rhealstone/rhdeadlockbrk/Makefile.am b/testsuites/rhealstone/rhdeadlockbrk/Makefile.am
deleted file mode 100644
index 3f6eebf9ff..0000000000
--- a/testsuites/rhealstone/rhdeadlockbrk/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-MANAGERS = all
-
-rtems_tests_PROGRAMS = rhdeadlockbrk
-rhdeadlockbrk_SOURCES = deadlockbrk.c
-rhdeadlockbrk_SOURCES += ../../tmtests/include/timesys.h
-
-dist_rtems_tests_DATA = rhdeadlockbrk.adoc
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-
-AM_CPPFLAGS += -I$(top_srcdir)/../tmtests/include
-AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-
-LINK_OBJS = $(rhdeadlockbrk_OBJECTS) $(rhdeadlockbrk_LDADD)
-LINK_LIBS = $(rhdeadlockbrk_LDLIBS)
-
-rhdeadlockbrk$(EXEEXT): $(rhdeadlockbrk_OBJECTS) $(rhdeadlockbrk_DEPENDENCIES)
- @rm -f rhdeadlockbrk$(EXEEXT)
- $(make-exe)
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/rhealstone/rhilatency/Makefile.am b/testsuites/rhealstone/rhilatency/Makefile.am
deleted file mode 100644
index faaf10f571..0000000000
--- a/testsuites/rhealstone/rhilatency/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-MANAGERS = all
-
-rtems_tests_PROGRAMS = rhilatency
-rhilatency_SOURCES = ilatency.c
-rhilatency_SOURCES += ../../tmtests/include/timesys.h
-
-dist_rtems_tests_DATA = rhilatency.adoc
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-
-AM_CPPFLAGS += -I$(top_srcdir)/../tmtests/include
-AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-
-LINK_OBJS = $(rhilatency_OBJECTS) $(rhilatency_ldaDD)
-LINK_LIBS = $(rhilatency_LDLIBS)
-
-rhilatency$(EXEEXT): $(rhilatency_OBJECTS) $(rhilatency_DEPENDENCIES)
- @rm -f rhilatency$(EXEEXT)
- $(make-exe)
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/rhealstone/rhmlatency/Makefile.am b/testsuites/rhealstone/rhmlatency/Makefile.am
deleted file mode 100644
index c8d90095f8..0000000000
--- a/testsuites/rhealstone/rhmlatency/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-MANAGERS = all
-
-rtems_tests_PROGRAMS = rhmlatency
-rhmlatency_SOURCES = mlatency.c
-rhmlatency_SOURCES += ../../tmtests/include/timesys.h
-
-dist_rtems_tests_DATA = rhmlatency.adoc
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-
-AM_CPPFLAGS += -I$(top_srcdir)/../tmtests/include
-AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-
-LINK_OBJS = $(rhmlatency_OBJECTS) $(rhmlatency_ldaDD)
-LINK_LIBS = $(rhmlatency_LDLIBS)
-
-rhmlatency$(EXEEXT): $(rhmlatency_OBJECTS) $(rhmlatency_DEPENDENCIES)
- @rm -f rhmlatency$(EXEEXT)
- $(make-exe)
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/rhealstone/rhsemshuffle/Makefile.am b/testsuites/rhealstone/rhsemshuffle/Makefile.am
deleted file mode 100644
index 88448297cf..0000000000
--- a/testsuites/rhealstone/rhsemshuffle/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-MANAGERS = all
-
-rtems_tests_PROGRAMS = rhsemshuffle
-rhsemshuffle_SOURCES = semshuffle.c
-rhsemshuffle_SOURCES += ../../tmtests/include/timesys.h
-
-dist_rtems_tests_DATA = rhsemshuffle.adoc
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-
-AM_CPPFLAGS += -I$(top_srcdir)/../tmtests/include
-AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-
-LINK_OBJS = $(rhsemshuffle_OBJECTS) $(rhsemshuffle_LDADD)
-LINK_LIBS = $(rhsemshuffle_LDLIBS)
-
-rhsemshuffle$(EXEEXT): $(rhsemshuffle_OBJECTS) $(rhsemshuffle_DEPENDENCIES)
- @rm -f rhsemshuffle$(EXEEXT)
- $(make-exe)
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/rhealstone/rhtaskpreempt/Makefile.am b/testsuites/rhealstone/rhtaskpreempt/Makefile.am
deleted file mode 100644
index d0106aabba..0000000000
--- a/testsuites/rhealstone/rhtaskpreempt/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-MANAGERS = all
-
-rtems_tests_PROGRAMS = rhtaskpreempt
-rhtaskpreempt_SOURCES = taskpreempt.c
-rhtaskpreempt_SOURCES += ../../tmtests/include/timesys.h
-
-dist_rtems_tests_DATA = rhtaskpreempt.adoc
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-
-AM_CPPFLAGS += -I$(top_srcdir)/../tmtests/include
-AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-
-LINK_OBJS = $(rhtaskpreempt_OBJECTS) $(rhtaskpreempt_LDADD)
-LINK_LIBS = $(rhtaskpreempt_LDLIBS)
-
-rhtaskpreempt$(EXEEXT): $(rhtaskpreempt_OBJECTS) $(rhtaskpreempt_DEPENDENCIES)
- @rm -f rhtaskpreempt$(EXEEXT)
- $(make-exe)
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/rhealstone/rhtaskswitch/Makefile.am b/testsuites/rhealstone/rhtaskswitch/Makefile.am
deleted file mode 100644
index 26ca733320..0000000000
--- a/testsuites/rhealstone/rhtaskswitch/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-MANAGERS = all
-
-rtems_tests_PROGRAMS = rhtaskswitch
-rhtaskswitch_SOURCES = taskswitch.c
-rhtaskswitch_SOURCES += ../../tmtests/include/timesys.h
-
-dist_rtems_tests_DATA = rhtaskswitch.adoc
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-
-AM_CPPFLAGS += -I$(top_srcdir)/../tmtests/include
-AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-
-LINK_OBJS = $(rhtaskswitch_OBJECTS) $(rhtaskswitch_LDADD)
-LINK_LIBS = $(rhtaskswitch_LDLIBS)
-
-rhtaskswitch$(EXEEXT): $(rhtaskswitch_OBJECTS) $(rhtaskswitch_DEPENDENCIES)
- @rm -f rhtaskswitch$(EXEEXT)
- $(make-exe)
-
-include $(top_srcdir)/../automake/local.am
--
2.15.1
More information about the devel
mailing list