[pygobject] tests: Run pygtkcompat tests separately
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] tests: Run pygtkcompat tests separately
- Date: Mon, 19 Nov 2012 13:11:14 +0000 (UTC)
commit e617f76e5b0c301c3ae92e1091aa86792de4d8e8
Author: Martin Pitt <martinpitt gnome org>
Date: Mon Nov 19 14:09:14 2012 +0100
tests: Run pygtkcompat tests separately
pygtkcompat changes the global namespace, in particular patching Gdk and Gtk
overrides. Run the tests in a separate process so that the main tests are not
potentially affected by the pygtkcompat test.
runtests.py runs all tests/test_*.py by default, so rename to
compat_test_pygtk.py and run that explicitly after successfully running the
main tests.
See https://bugzilla.gnome.org/show_bug.cgi?id=688219
tests/Makefile.am | 3 +++
.../{test_pygtkcompat.py => compat_test_pygtk.py} | 0
2 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0764ea3..fdff898 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -125,6 +125,8 @@ RUN_TESTS_ENV_VARS= \
MALLOC_CHECK_=3 \
TESTS_BUILDDIR=$(builddir)
+# pygtkcompat tests need to be run in a separate process as they
+# clobber global name space
check-local: $(LTLIBRARIES:.la=.so) $(test_typelibs) gschemas.compiled
@echo " CHECK Pyflakes"
@if type pyflakes >/dev/null 2>&1; then pyflakes $(top_srcdir); else echo "skipped, pyflakes not installed"; fi
@@ -134,6 +136,7 @@ check-local: $(LTLIBRARIES:.la=.so) $(test_typelibs) gschemas.compiled
fi
export `$(DBUS_LAUNCH)` && \
$(RUN_TESTS_ENV_VARS) $(EXEC_NAME) $(PYTHON) -Wd -Werror::PendingDeprecationWarning -Werror::DeprecationWarning -Werror::RuntimeWarning $(srcdir)/runtests.py; rc=$$?; \
+ [ "$$rc" -ne 0 ] || [ -n "$$TEST_NAMES" ] || TEST_NAMES=compat_test_pygtk $(RUN_TESTS_ENV_VARS) $(EXEC_NAME) $(PYTHON) -Wd -Werror::PendingDeprecationWarning -Werror::DeprecationWarning -Werror::RuntimeWarning $(srcdir)/runtests.py; rc=$$?; \
kill $$DBUS_SESSION_BUS_PID; \
exit $$rc
diff --git a/tests/test_pygtkcompat.py b/tests/compat_test_pygtk.py
similarity index 100%
rename from tests/test_pygtkcompat.py
rename to tests/compat_test_pygtk.py
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]