summaryrefslogtreecommitdiffstats
path: root/pym/portage/tests/runTests
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2007-02-01 18:58:23 +0000
committerAlec Warner <antarus@gentoo.org>2007-02-01 18:58:23 +0000
commitc78d5fc325f9ed1cbac049e2b0bb52948a084e09 (patch)
tree60656e349cd05cee755d5d8eac0eb9c8c46825d2 /pym/portage/tests/runTests
parentd50d79b42515ba8c1fb5ccda989641da73f466d0 (diff)
downloadportage-c78d5fc325f9ed1cbac049e2b0bb52948a084e09.tar.gz
portage-c78d5fc325f9ed1cbac049e2b0bb52948a084e09.tar.bz2
portage-c78d5fc325f9ed1cbac049e2b0bb52948a084e09.zip
A somewhat more intelligent layout, move tests into portaage namespace so we can import them easier, seems to be a more common layout from what I've seen. Also rewrite the test runner to work with new layout
svn path=/main/trunk/; revision=5863
Diffstat (limited to 'pym/portage/tests/runTests')
-rwxr-xr-xpym/portage/tests/runTests20
1 files changed, 20 insertions, 0 deletions
diff --git a/pym/portage/tests/runTests b/pym/portage/tests/runTests
new file mode 100755
index 000000000..6781796f8
--- /dev/null
+++ b/pym/portage/tests/runTests
@@ -0,0 +1,20 @@
+#!/usr/bin/python
+# runTests.py -- Portage Unit Test Functionality
+# Copyright 2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+
+import os, sys
+import os.path as osp
+
+# Insert our parent dir so we can do shiny import "tests"
+# This line courtesy of Marienz and Pkgcore ;)
+sys.path.insert(0, osp.dirname(osp.dirname(osp.dirname(osp.abspath(__file__)))))
+
+import portage.tests as tests
+
+if __name__ == "__main__":
+ result = tests.main()
+ if result.failures:
+ sys.exit(1)