[pitivi: 30/65] Make sure PITIVI_TOP_LEVEL_DIR is always set when running the tests
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi: 30/65] Make sure PITIVI_TOP_LEVEL_DIR is always set when running the tests
- Date: Mon, 4 Jul 2011 01:21:45 +0000 (UTC)
commit 241c48556791fda56a1fe4c1dcccba2b73c77b3e
Author: Alex BÄluÈ <alexandru balut gmail com>
Date: Thu Jun 9 11:42:29 2011 +0200
Make sure PITIVI_TOP_LEVEL_DIR is always set when running the tests
tests/Makefile.am | 3 +--
tests/runtests.py | 6 ++++++
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f6182a8..5c65fb0 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -43,8 +43,7 @@ clean-local:
rm -f testProject.ptv testproject.xptv testproject2.xptv
check-local:
- @PYTHONPATH=$(top_srcdir):$(PYTHONPATH) PITIVI_TOP_LEVEL_DIR='$(top_srcdir)' $(PYTHON)\
- $(srcdir)/runtests.py
+ @PYTHONPATH=$(top_srcdir):$(PYTHONPATH) $(PYTHON) $(srcdir)/runtests.py
%.check: %
@PYTHONPATH=$(top_srcdir):$(PYTHONPATH) $(PYTHON) $(srcdir)/runtests.py $*
diff --git a/tests/runtests.py b/tests/runtests.py
index 7132efb..3eb4742 100644
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -47,6 +47,12 @@ if 'VERBOSE' in os.environ:
from pitivi.log import log
log.init('PITIVI_DEBUG', 1)
+# Make available to configure.py the top level dir.
+dir = os.path.dirname(os.path.abspath(__file__))
+top_srcdir = os.path.split(dir)[0]
+os.environ.setdefault('PITIVI_TOP_LEVEL_DIR', top_srcdir)
+
+# Run the tests.
testRunner = unittest.TextTestRunner(descriptions=descriptions,
verbosity=verbosity)
result = testRunner.run(suite)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]