Files
sablink-distro/dev-python/pygobject-cairo/files/pygobject-2.90.1-make_check.patch
T
Fabio Erculiani 45194bb5db [dev-python/pygobject*] provide split ebuilds version of pygobject
dev-python/pygobject[cairo] is starting to be required for several
graphical application that otherwise fail to run at runtime. The
list of apps includes the in-development Entropy Rigo Browser.
Unfortunately, dev-python/pygobject[cairo] pulls in a shitload
of deps: half X -> mesa -> llvm/clang. This is unwanted on
X-less images we have (SpinBase) due to the big amount of extra
software we would have to ship with.
We cannot remove dev-python/pygobject from ISO images because
Anaconda requires it.
2012-02-12 08:33:22 +01:00

73 lines
2.5 KiB
Diff

From b5c4b8b97a1ccb9a4c63ab726ea9c84d81ef51ca Mon Sep 17 00:00:00 2001
From: Gilles Dartiguelongue <eva@gentoo.org>
Date: Fri, 5 Nov 2010 23:39:08 +0100
Subject: [PATCH 2/3] Do not build tests unless needed
[Alexandre Rostovtsev <tetromino@gmail.com>: port to 2.90.1]
---
tests/Makefile.am | 10 ++++------
tests/runtests.py | 3 +++
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4ec6477..c52cb9d 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,5 +1,5 @@
CLEANFILES =
-noinst_LTLIBRARIES = libregress.la libgimarshallingtests.la
+check_LTLIBRARIES = libregress.la libgimarshallingtests.la
nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
libregress_la_CFLAGS = $(GIO_CFLAGS) $(PYCAIRO_CFLAGS)
@@ -43,7 +43,7 @@ gschemas.compiled: org.gnome.test.gschema.xml
CLEANFILES += Regress-1.0.gir Regress-1.0.typelib GIMarshallingTests-1.0.gir GIMarshallingTests-1.0.typelib gschemas.compiled
-noinst_LTLIBRARIES += testhelper.la
+check_LTLIBRARIES += testhelper.la
testhelper_la_CFLAGS = -I$(top_srcdir)/gi/_gobject -I$(top_srcdir)/gi/_glib $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
testhelper_la_LDFLAGS = -module -avoid-version
@@ -63,8 +63,6 @@ testhelper.la: $(testhelper_la_OBJECTS) $(testhelper_la_DEPENDENCIES)
test -L $@ || $(LN_S) .libs/$@ $@
-all: $(LTLIBRARIES:.la=.so)
-
TEST_FILES_STATIC = \
test_gobject.py \
test_interface.py \
@@ -97,7 +95,7 @@ EXTRA_DIST = \
EXTRA_DIST += $(TEST_FILES_STATIC) $(TEST_FILES_GI)
clean-local:
- rm -f $(LTLIBRARIES:.la=.so) file.txt~
+ rm -f $(check_LTLIBRARIES:.la=.so) file.txt~
DBUS_LAUNCH=$(shell which dbus-launch)
RUN_TESTS_ENV_VARS= \
@@ -108,7 +106,7 @@ RUN_TESTS_ENV_VARS= \
TESTS_BUILDDIR=$(builddir)
RUN_TESTS_LAUNCH=$(RUN_TESTS_ENV_VARS) $(DBUS_LAUNCH) $(EXEC_NAME) $(PYTHON) $(srcdir)/runtests.py
-check-local: $(LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.typelib gschemas.compiled
+check-local: $(check_LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.typelib gschemas.compiled
TEST_FILES="$(TEST_FILES_STATIC)" $(RUN_TESTS_LAUNCH)
TEST_FILES="$(TEST_FILES_GI)" $(RUN_TESTS_LAUNCH)
diff --git a/tests/runtests.py b/tests/runtests.py
index 2a8ecf4..dc9fb03 100755
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -7,6 +7,9 @@ import sys
import unittest
+# Some tests fail with translated messages.
+os.environ["LC_ALL"] = "C"
+
if '--help' in sys.argv:
print("Usage: ./runtests.py <testfiles>")
sys.exit(0)