[gnome-builder] build: Clean up test handling
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] build: Clean up test handling
- Date: Wed, 6 May 2015 21:22:06 +0000 (UTC)
commit ec52123c55d3d3eb8a1332bbffbe06f4769315ee
Author: Patrick Griffis <tingping tingping se>
Date: Wed May 6 15:25:07 2015 -0400
build: Clean up test handling
- Remove usage of glib-tap (shouldn't be needed?)
- Add flag for building on `make all`
build/autotools/Makefile.am | 2 -
build/autotools/Makefile.am.glib-tap | 135 -------
build/autotools/glibtests.m4 | 28 --
build/autotools/tap-driver.sh | 652 ----------------------------------
configure.ac | 12 +-
tests/Makefile.am | 35 +-
6 files changed, 27 insertions(+), 837 deletions(-)
---
diff --git a/build/autotools/Makefile.am b/build/autotools/Makefile.am
index 8c52048..2ab7bf8 100644
--- a/build/autotools/Makefile.am
+++ b/build/autotools/Makefile.am
@@ -8,10 +8,8 @@ EXTRA_DIST = \
ax_check_compile_flag.m4 \
ax_check_link_flag.m4 \
ax_require_defined.m4 \
- glibtests.m4 \
introspection.m4 \
pkg.m4 \
- tap-driver.sh \
tap-test \
$(NULL)
diff --git a/configure.ac b/configure.ac
index e6722ea..f51b965 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,7 +65,6 @@ AC_PROG_CXX
AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
AC_PATH_PROG([GLIB_COMPILE_RESOURCES], [glib-compile-resources])
-AM_PATH_GLIB_2_0
AC_HEADER_STDC
PKG_PROG_PKG_CONFIG([0.22])
@@ -226,9 +225,14 @@ GOBJECT_INTROSPECTION_CHECK([1.30.0])
dnl ***********************************************************************
-dnl GLib Unit Testing Support
+dnl Always build tests
dnl ***********************************************************************
-GLIB_TESTS
+AC_ARG_ENABLE([tests],
+ AS_HELP_STRING([--enable-tests],
+ [Enable always building tests during 'make all' [default=no]]),
+ [enable_tests=$enableval], [enable_tests=no])
+
+AM_CONDITIONAL([ENABLE_TESTS], test "$enable_tests" = "yes")
dnl ***********************************************************************
@@ -331,5 +335,5 @@ echo ""
echo " Enable Debug ......................... : ${enable_debug}"
echo " Enable Tracing ....................... : ${enable_tracing}"
echo " Build API reference ...................: ${enable_gtk_doc}"
-echo " Enable Test Suite .....................: ${enable_glibtest}"
+echo " Build Test Suite ......................: ${enable_tests}"
echo ""
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4c30f42..3d8c36e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,6 +1,3 @@
-include $(top_srcdir)/build/autotools/Makefile.am.glib-tap
-
-
tests_cflags = \
-I$(top_srcdir)/libide \
-I$(top_builddir)/libide \
@@ -16,57 +13,59 @@ tests_libs = \
$(NULL)
-TESTS += test-ide-context
-noinst_PROGRAMS += test-ide-context
+TESTS_ENVIRONMENT= \
+ GI_TYPELIB_PATH="$(top_srcdir)/libide" \
+ G_TEST_SRCDIR="$(abs_srcdir)" \
+ G_TEST_BUILDDIR="$(abs_builddir)" \
+ G_DEBUG=gc-friendly \
+ MALLOC_CHECK_=2 \
+ MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
+
+LOG_COMPILER = $(top_srcdir)/build/autotools/tap-test
+
+TESTS = test-ide-context
test_ide_context_SOURCES = test-ide-context.c
test_ide_context_CFLAGS = $(tests_cflags)
test_ide_context_LDADD = $(tests_libs)
TESTS += test-ide-back-forward-list
-noinst_PROGRAMS += test-ide-back-forward-list
test_ide_back_forward_list_SOURCES = test-ide-back-forward-list.c
test_ide_back_forward_list_CFLAGS = $(tests_cflags)
test_ide_back_forward_list_LDADD = $(tests_libs)
TESTS += test-ide-buffer-manager
-noinst_PROGRAMS += test-ide-buffer-manager
test_ide_buffer_manager_SOURCES = test-ide-buffer-manager.c
test_ide_buffer_manager_CFLAGS = $(tests_cflags)
test_ide_buffer_manager_LDADD = $(tests_libs)
TESTS += test-ide-buffer
-noinst_PROGRAMS += test-ide-buffer
test_ide_buffer_SOURCES = test-ide-buffer.c
test_ide_buffer_CFLAGS = $(tests_cflags)
test_ide_buffer_LDADD = $(tests_libs)
TESTS += test-ide-file-settings
-noinst_PROGRAMS += test-ide-file-settings
test_ide_file_settings_SOURCES = test-ide-file-settings.c
test_ide_file_settings_CFLAGS = $(tests_cflags)
test_ide_file_settings_LDADD = $(tests_libs)
TESTS += test-ide-indenter
-noinst_PROGRAMS += test-ide-indenter
test_ide_indenter_SOURCES = test-ide-indenter.c
test_ide_indenter_CFLAGS = $(tests_cflags)
test_ide_indenter_LDADD = $(tests_libs)
TESTS += test-ide-vcs-uri
-noinst_PROGRAMS += test-ide-vcs-uri
test_ide_vcs_uri_SOURCES = test-ide-vcs-uri.c
test_ide_vcs_uri_CFLAGS = $(tests_cflags)
test_ide_vcs_uri_LDADD = $(tests_libs)
TESTS += test-c-parse-helper
-noinst_PROGRAMS += test-c-parse-helper
test_c_parse_helper_SOURCES = test-c-parse-helper.c
test_c_parse_helper_CFLAGS = \
$(tests_cflags) \
@@ -77,7 +76,6 @@ test_c_parse_helper_LDADD = $(tests_libs)
TESTS += test-vim
-noinst_PROGRAMS += test-vim
test_vim_SOURCES = test-vim.c
test_vim_CFLAGS = \
$(tests_cflags) \
@@ -90,19 +88,24 @@ test_vim_LDADD = \
$(NULL)
-noinst_PROGRAMS += test-ide-source-view
+misc_programs = test-ide-source-view
test_ide_source_view_SOURCES = test-ide-source-view.c
test_ide_source_view_CFLAGS = $(tests_cflags)
test_ide_source_view_LDADD = $(tests_libs)
-noinst_PROGRAMS += test-egg-state-machine
+TESTS += test-egg-state-machine
test_egg_state_machine_SOURCES = test-egg-state-machine.c
test_egg_state_machine_CFLAGS = $(tests_cflags) -I$(top_srcdir)/contrib/egg
test_egg_state_machine_LDADD = $(tests_libs) $(top_builddir)/contrib/egg/libegg.la
+if ENABLE_TESTS
+noinst_PROGRAMS = $(TESTS) $(misc_programs)
+endif
+
+check_PROGRAMS = $(TESTS) $(misc_programs)
-EXTRA_DIST += \
+EXTRA_DIST = \
data/project1/configure.ac \
data/project1/.editorconfig \
$(NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]