[glom] Build and run tests on make check



commit daf013466c603a86051aa90da3f9f5f2f61c576c
Author: Daniel Elstner <danielk openismus com>
Date:   Tue Jul 28 22:30:25 2009 +0200

    Build and run tests on make check
    
    * Makefile.am (AM_DEFAULT_SOURCE_EXT): Make use of the Automake default
    _SOURCES feature for building single-source-file programs.
    (noinst_PROGRAMS): Move to tests.am.
    * tests.am (check_PROGRAMS): List all test executables here, so they
    are only built on make check.
    (TESTS): List unit test programs from the regression_tests/ directory.

 ChangeLog   |   11 +++++++++++
 Makefile.am |   19 +++++++++----------
 tests.am    |   22 +++++++++++++---------
 3 files changed, 33 insertions(+), 19 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 102467a..4a5663d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2009-07-28  Daniel Elstner  <danielk openismus com>
 
+	Build and run tests on make check
+
+	* Makefile.am (AM_DEFAULT_SOURCE_EXT): Make use of the Automake default
+	_SOURCES feature for building single-source-file programs.
+	(noinst_PROGRAMS): Move to tests.am.
+	* tests.am (check_PROGRAMS): List all test executables here, so they
+	are only built on make check.
+	(TESTS): List unit test programs from the regression_tests/ directory.
+
+2009-07-28  Daniel Elstner  <danielk openismus com>
+
 	Use deprecated libtool macros for Maemo's sake
 
 	* configure.ac (LT_PREREQ), (LT_INIT): Comment-out.
diff --git a/Makefile.am b/Makefile.am
index f8fa51e..19cbc37 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,8 +21,17 @@
 ## excellent paper to learn why recursive make invocations are both slow and
 ## error-prone:  http://miller.emu.id.au/pmiller/books/rmch/
 
+# Put compiled object files into the same sub-directory as their sources
 AUTOMAKE_OPTIONS = subdir-objects
+
+# Use .cc as default extension if no _SOURCES have been defined
+AM_DEFAULT_SOURCE_EXT = .cc
+
+# Point to our macro directory and pick up user flags from the environment
 ACLOCAL_AMFLAGS  = -I macros ${ACLOCAL_FLAGS}
+
+# Make warnings always fatal at distcheck time, and disable execution
+# of tools that change files not installed by the package itself
 DISTCHECK_CONFIGURE_FLAGS = --enable-warnings=fatal \
 --disable-scrollkeeper --disable-update-mime-database
 
@@ -44,16 +53,6 @@ bin_PROGRAMS = glom/glom
 lib_LTLIBRARIES = glom/libglom/libglom-1.12.la
 pyexec_LTLIBRARIES = glom/python_embed/python_module/glom_1_12.la
 
-noinst_PROGRAMS =						\
-	glom/libglom/test_connectionpool			\
-	glom/libglom/test_document				\
-	glom/libglom/test_sharedptr_layoutitem			\
-	glom/utility_widgets/test_flowtable			\
-	glom/utility_widgets/egg/toolpalette/testtoolpalette	\
-	glom/test_pyembed					\
-	regression_tests/test_parsing_time			\
-	regression_tests/test_signal_reemit
-
 noinst_LIBRARIES =						\
 	glom/utility_widgets/egg/toolpalette/libeggtoolpalette.a\
 	glom/utility_widgets/egg/util/libeggutil.a
diff --git a/tests.am b/tests.am
index d541698..4c4c84b 100644
--- a/tests.am
+++ b/tests.am
@@ -15,15 +15,23 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+check_PROGRAMS =						\
+	glom/libglom/test_connectionpool			\
+	glom/libglom/test_document				\
+	glom/libglom/test_sharedptr_layoutitem			\
+	glom/utility_widgets/test_flowtable			\
+	glom/utility_widgets/egg/toolpalette/testtoolpalette	\
+	glom/test_pyembed					\
+	regression_tests/test_parsing_time			\
+	regression_tests/test_signal_reemit
+
+TESTS =	regression_tests/test_parsing_time	\
+	regression_tests/test_signal_reemit
+
 tests_ldadd = glom/libglom/libglom-$(GLOM_ABI_VERSION).la $(LIBGLOM_LIBS)
 
-glom_libglom_test_connectionpool_SOURCES = glom/libglom/test_connectionpool.cc
 glom_libglom_test_connectionpool_LDADD = $(tests_ldadd)
-
-glom_libglom_test_document_SOURCES = glom/libglom/test_document.cc
 glom_libglom_test_document_LDADD = $(tests_ldadd)
-
-glom_libglom_test_sharedptr_layoutitem_SOURCES = glom/libglom/test_sharedptr_layoutitem.cc
 glom_libglom_test_sharedptr_layoutitem_LDADD = $(tests_ldadd)
 
 glom_utility_widgets_test_flowtable_SOURCES =	\
@@ -41,11 +49,7 @@ glom_utility_widgets_egg_toolpalette_testtoolpalette_LDADD =	\
 	glom/utility_widgets/egg/util/libeggutil.a		\
 	$(EGG_LIBS)
 
-glom_test_pyembed_SOURCES = glom/test_pyembed.cc
 glom_test_pyembed_LDADD = $(LIBGLOM_LIBS) $(PYTHON_LIBS)
 
-regression_tests_test_parsing_time_SOURCES = regression_tests/test_parsing_time.cc
 regression_tests_test_parsing_time_LDADD = $(tests_ldadd)
-
-regression_tests_test_signal_reemit_SOURCES = regression_tests/test_signal_reemit.cc
 regression_tests_test_signal_reemit_LDADD = $(LIBGLOM_LIBS)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]