]> git.draconx.ca Git - gentoo-fixes.git/blob - dev-python/pygobject/files/pygobject-2.28.3-make_check.patch
Resurrect dev-python/pygtk.
[gentoo-fixes.git] / dev-python / pygobject / files / pygobject-2.28.3-make_check.patch
1 From b5c4b8b97a1ccb9a4c63ab726ea9c84d81ef51ca Mon Sep 17 00:00:00 2001
2 From: Gilles Dartiguelongue <eva@gentoo.org>
3 Date: Fri, 5 Nov 2010 23:39:08 +0100
4 Subject: [PATCH 2/3] Do not build tests unless needed
5
6 ---
7  tests/Makefile.am |   12 +++++-------
8  tests/runtests.py |    2 ++
9  2 files changed, 7 insertions(+), 7 deletions(-)
10
11 diff --git a/tests/Makefile.am b/tests/Makefile.am
12 index bad15f0..5b0859a 100644
13 --- a/tests/Makefile.am
14 +++ b/tests/Makefile.am
15 @@ -1,7 +1,7 @@
16  CLEANFILES =
17 -noinst_LTLIBRARIES = 
18 +check_LTLIBRARIES = 
19  if ENABLE_INTROSPECTION
20 -noinst_LTLIBRARIES += libregress.la libgimarshallingtests.la
21 +check_LTLIBRARIES += libregress.la libgimarshallingtests.la
22  
23  nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
24  libregress_la_CFLAGS = $(GIO_CFLAGS) $(PYCAIRO_CFLAGS)
25 @@ -46,7 +46,7 @@ gschemas.compiled: org.gnome.test.gschema.xml
26  CLEANFILES += Regress-1.0.gir Regress-1.0.typelib GIMarshallingTests-1.0.gir GIMarshallingTests-1.0.typelib gschemas.compiled
27  endif
28  
29 -noinst_LTLIBRARIES += testhelper.la
30 +check_LTLIBRARIES += testhelper.la
31  
32  testhelper_la_CFLAGS = -I$(top_srcdir)/gobject -I$(top_srcdir)/glib $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
33  testhelper_la_LDFLAGS = -module -avoid-version
34 @@ -66,8 +66,6 @@ testhelper.la: $(testhelper_la_OBJECTS) $(testhelper_la_DEPENDENCIES)
35         test -L $@ || $(LN_S) .libs/$@ $@
36  
37  
38 -all: $(LTLIBRARIES:.la=.so)
39 -
40  TEST_FILES_STATIC = \
41         test_gobject.py \
42         test_interface.py \
43 @@ -109,7 +107,7 @@ EXTRA_DIST = \
44  EXTRA_DIST += $(TEST_FILES_STATIC) $(TEST_FILES_GI) $(TEST_FILES_GIO)
45  
46  clean-local:
47 -       rm -f $(LTLIBRARIES:.la=.so) file.txt~
48 +       rm -f $(check_LTLIBRARIES:.la=.so) file.txt~
49  
50  DBUS_LAUNCH=$(shell which dbus-launch)
51  RUN_TESTS_ENV_VARS= \
52 @@ -121,7 +119,7 @@ RUN_TESTS_ENV_VARS= \
53  RUN_TESTS_LAUNCH=$(RUN_TESTS_ENV_VARS) $(DBUS_LAUNCH) $(EXEC_NAME) $(PYTHON) $(srcdir)/runtests.py
54  
55  # run tests in separately to avoid loading static and introspection bindings in the same process
56 -check-local: $(LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.typelib gschemas.compiled
57 +check-local: $(check_LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.typelib gschemas.compiled
58         TEST_FILES="$(TEST_FILES_STATIC)" $(RUN_TESTS_LAUNCH)
59         TEST_FILES="$(TEST_FILES_GI)" $(RUN_TESTS_LAUNCH)
60  if BUILD_GIO
61 diff --git a/tests/runtests.py b/tests/runtests.py
62 index 2bb8637..4107bcf 100644
63 --- a/tests/runtests.py
64 +++ b/tests/runtests.py
65 @@ -6,6 +6,8 @@ import sys
66  
67  import unittest
68  
69 +# Some tests fail with translated messages.
70 +os.environ["LC_ALL"] = "C"
71  
72  # force untranslated messages, as we check for them in some tests
73  os.environ['LC_MESSAGES'] = 'C'
74 -- 
75 1.7.4.1
76