diff options
author | Alec Warner <antarus@gentoo.org> | 2007-02-01 18:58:23 +0000 |
---|---|---|
committer | Alec Warner <antarus@gentoo.org> | 2007-02-01 18:58:23 +0000 |
commit | c78d5fc325f9ed1cbac049e2b0bb52948a084e09 (patch) | |
tree | 60656e349cd05cee755d5d8eac0eb9c8c46825d2 /pym/portage/tests/runTests | |
parent | d50d79b42515ba8c1fb5ccda989641da73f466d0 (diff) | |
download | portage-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-x | pym/portage/tests/runTests | 20 |
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) |