[gnome-builder] libide: just use helper include for debug enabling
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide: just use helper include for debug enabling
- Date: Mon, 23 Mar 2015 23:49:29 +0000 (UTC)
commit 41dbb2353a5c80f35eea3d4f3c8c69f1d876f18e
Author: Christian Hergert <christian hergert me>
Date: Mon Mar 2 14:56:35 2015 -0800
libide: just use helper include for debug enabling
This works more reliably than the makefile changes.
tests/test-ide-back-forward-list.c | 2 ++
tests/test-ide-buffer-manager.c | 2 ++
tests/test-ide-buffer.c | 2 ++
tests/test-ide-context.c | 2 ++
tests/test-ide-source-view.c | 2 ++
tests/tests.h | 7 +++++++
tests/tests.mk | 16 ++--------------
7 files changed, 19 insertions(+), 14 deletions(-)
---
diff --git a/tests/test-ide-back-forward-list.c b/tests/test-ide-back-forward-list.c
index 04927ed..361147f 100644
--- a/tests/test-ide-back-forward-list.c
+++ b/tests/test-ide-back-forward-list.c
@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "tests.h"
+
#include <glib.h>
#include <ide.h>
diff --git a/tests/test-ide-buffer-manager.c b/tests/test-ide-buffer-manager.c
index 2f482f1..643bef9 100644
--- a/tests/test-ide-buffer-manager.c
+++ b/tests/test-ide-buffer-manager.c
@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "tests.h"
+
#include <glib.h>
#include <glib/gstdio.h>
#include <ide.h>
diff --git a/tests/test-ide-buffer.c b/tests/test-ide-buffer.c
index fd30b3d..aa59288 100644
--- a/tests/test-ide-buffer.c
+++ b/tests/test-ide-buffer.c
@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "tests.h"
+
#include <glib.h>
#include <glib/gstdio.h>
#include <ide.h>
diff --git a/tests/test-ide-context.c b/tests/test-ide-context.c
index 476797c..1b362dc 100644
--- a/tests/test-ide-context.c
+++ b/tests/test-ide-context.c
@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "tests.h"
+
#include <ide.h>
typedef struct
diff --git a/tests/test-ide-source-view.c b/tests/test-ide-source-view.c
index a245952..bb9ed72 100644
--- a/tests/test-ide-source-view.c
+++ b/tests/test-ide-source-view.c
@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "tests.h"
+
#include <ide.h>
static IdeContext *gContext;
diff --git a/tests/tests.h b/tests/tests.h
new file mode 100644
index 0000000..e68712e
--- /dev/null
+++ b/tests/tests.h
@@ -0,0 +1,7 @@
+#ifdef G_DISABLE_ASSERT
+# undef G_DISABLE_ASSERT
+#endif
+
+#ifdef G_DISABLE_CAST_CHECKS
+# undef G_DISABLE_CAST_CHECKS
+#endif
diff --git a/tests/tests.mk b/tests/tests.mk
index b1c37d3..a23dce7 100644
--- a/tests/tests.mk
+++ b/tests/tests.mk
@@ -1,21 +1,14 @@
-# Place after libide_1_0_la_CFLAGS
-test_shared_cflags = \
- -UG_DISABLE_ASSERT \
- -UG_DISABLE_CAST_CHECKS \
- $(NULL)
-
-
noinst_PROGRAMS += test-c-parse-helper
TESTS += test-c-parse-helper
test_c_parse_helper_SOURCES = tests/test-c-parse-helper.c
-test_c_parse_helper_CFLAGS = $(test_shared_cflags) $(libgnome_builder_la_CFLAGS)
+test_c_parse_helper_CFLAGS = $(libgnome_builder_la_CFLAGS)
test_c_parse_helper_LDADD = libgnome-builder.la
noinst_PROGRAMS += test-navigation-list
TESTS += test-navigation-list
test_navigation_list_SOURCES = tests/test-navigation-list.c
-test_navigation_list_CFLAGS = $(test_shared_cflags) $(libgnome_builder_la_CFLAGS)
+test_navigation_list_CFLAGS = $(libgnome_builder_la_CFLAGS)
test_navigation_list_LDADD = libgnome-builder.la
@@ -24,7 +17,6 @@ TESTS += test-ide-context
test_ide_context_SOURCES = tests/test-ide-context.c
test_ide_context_CFLAGS = \
$(libide_1_0_la_CFLAGS) \
- $(test_shared_cflags) \
-DTEST_DATA_DIR="\"$(top_srcdir)/tests/data\""
test_ide_context_LDADD = libide-1.0.la $(LIBIDE_LIBS)
@@ -34,7 +26,6 @@ TESTS += test-ide-back-forward-list
test_ide_back_forward_list_SOURCES = tests/test-ide-back-forward-list.c
test_ide_back_forward_list_CFLAGS = \
$(libide_1_0_la_CFLAGS) \
- $(test_shared_cflags) \
-DTEST_DATA_DIR="\"$(top_srcdir)/tests/data\""
test_ide_back_forward_list_LDADD = libide-1.0.la $(LIBIDE_LIBS)
@@ -44,7 +35,6 @@ TESTS += test-ide-buffer-manager
test_ide_buffer_manager_SOURCES = tests/test-ide-buffer-manager.c
test_ide_buffer_manager_CFLAGS = \
$(libide_1_0_la_CFLAGS) \
- $(test_shared_cflags) \
-DTEST_DATA_DIR="\"$(top_srcdir)/tests/data\""
test_ide_buffer_manager_LDADD = libide-1.0.la $(LIBIDE_LIBS)
@@ -53,7 +43,6 @@ TESTS += test-ide-buffer
test_ide_buffer_SOURCES = tests/test-ide-buffer.c
test_ide_buffer_CFLAGS = \
$(libide_1_0_la_CFLAGS) \
- $(test_shared_cflags) \
-DTEST_DATA_DIR="\"$(top_srcdir)/tests/data\""
test_ide_buffer_LDADD = libide-1.0.la $(LIBIDE_LIBS)
@@ -62,7 +51,6 @@ noinst_PROGRAMS += test-ide-source-view
test_ide_source_view_SOURCES = tests/test-ide-source-view.c
test_ide_source_view_CFLAGS = \
$(libide_1_0_la_CFLAGS) \
- $(test_shared_cflags) \
-DTEST_DATA_DIR="\"$(top_srcdir)/tests/data\""
test_ide_source_view_LDADD = libide-1.0.la $(LIBIDE_LIBS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]