After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 691307 - [PATCH] build: If cairo isn't found, don't build the tests with it
[PATCH] build: If cairo isn't found, don't build the tests with it
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2013-01-07 19:09 UTC by Colin Walters
Modified: 2013-01-08 15:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] build: If cairo isn't found, don't build the tests with it (4.67 KB, patch)
2013-01-07 19:09 UTC, Colin Walters
reviewed Details | Review

Description Colin Walters 2013-01-07 19:09:04 UTC
Created attachment 232919 [details] [review]
[PATCH] build: If cairo isn't found, don't build the tests with it

This is a followup to the previous work which allowed us to build
without cairo - now we can run the tests too.
---
 Makefile-test.am |   28 ++++++++++++++++++----------
 configure.ac     |    3 ---
 test/gjs-unit.c  |    2 ++
 3 files changed, 20 insertions(+), 13 deletions(-)
Comment 1 Jasper St. Pierre (not reading bugmail) 2013-01-07 19:18:13 UTC
Review of attachment 232919 [details] [review]:

::: Makefile-test.am
@@ -77,3 @@
 nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
-libregress_la_CFLAGS = $(GJS_CFLAGS) $(GJS_CAIRO_CFLAGS)
-libregress_la_LDFLAGS = -avoid-version $(GJS_LIBS) $(GJS_CAIRO_LIBS)

We should punt off the cairo parts of libregress to another library.

::: test/gjs-unit.c
@@ +267,3 @@
             continue;
         }
+        if (g_str_has_prefix (name, "testCairo") && g_getenv ("GJS_TEST_SKIP_CAIRO"))

Yuck.
Comment 2 Colin Walters 2013-01-07 19:30:57 UTC
(In reply to comment #1)

> We should punt off the cairo parts of libregress to another library.

Well...it'd require coordinated updates of everything using it.  But I'll take a look at the testing situation when I push hard for installed tests.

> ::: test/gjs-unit.c
> @@ +267,3 @@
>              continue;
>          }
> +        if (g_str_has_prefix (name, "testCairo") && g_getenv
> ("GJS_TEST_SKIP_CAIRO"))
> 
> Yuck.

For sure, I originally had a generic GJS_SKIP_TESTS but it seemed like overkill.
Comment 3 Jasper St. Pierre (not reading bugmail) 2013-01-07 19:39:07 UTC
I was going to say something about not running the tests with some Makefile magic, but it seems we just iterate over the directory. We should probably explicitly specify which tests we want to run in the Makefile.
Comment 4 Colin Walters 2013-01-07 19:47:33 UTC
(In reply to comment #3)
> I was going to say something about not running the tests with some Makefile
> magic, but it seems we just iterate over the directory. We should probably
> explicitly specify which tests we want to run in the Makefile.

Probably...but my enthusiasm for redoing this stuff is tempered by the fact that this is all going to have to be massively rewritten for installed tests.