diff options
author | Alec Warner <antarus@gentoo.org> | 2007-09-07 09:40:39 +0000 |
---|---|---|
committer | Alec Warner <antarus@gentoo.org> | 2007-09-07 09:40:39 +0000 |
commit | 40e34b8ce64628d6745179b65cbeadac85ca30e4 (patch) | |
tree | c92c8c94288e75f7ea6c26f912efe99e5e0986e6 | |
parent | 8eb244e46b6c113008d31f5d8402e78f9fb17778 (diff) | |
download | portage-40e34b8ce64628d6745179b65cbeadac85ca30e4.tar.gz portage-40e34b8ce64628d6745179b65cbeadac85ca30e4.tar.bz2 portage-40e34b8ce64628d6745179b65cbeadac85ca30e4.zip |
Rewrite testing to use __test__ instead of hardcoded dirs
svn path=/main/trunk/; revision=7748
-rw-r--r-- | pym/portage/tests/__init__.py | 15 | ||||
-rw-r--r-- | pym/portage/tests/bin/__test__ | 0 | ||||
-rw-r--r-- | pym/portage/tests/dep/__test__ | 0 | ||||
-rw-r--r-- | pym/portage/tests/env/__test__ | 0 | ||||
-rw-r--r-- | pym/portage/tests/env/config/__test__ | 0 | ||||
-rw-r--r-- | pym/portage/tests/util/__test__ | 0 | ||||
-rw-r--r-- | pym/portage/tests/versions/__test__ | 0 | ||||
-rw-r--r-- | pym/portage/tests/xpak/__test__ | 0 |
8 files changed, 13 insertions, 2 deletions
diff --git a/pym/portage/tests/__init__.py b/pym/portage/tests/__init__.py index 2ade6d402..8380b6c31 100644 --- a/pym/portage/tests/__init__.py +++ b/pym/portage/tests/__init__.py @@ -9,10 +9,21 @@ import time import unittest def main(): - testDirs = ["bin", "dep", "ebuild", - "env/config", "util", "versions", "xpak", "sets/shell"] + + TEST_FILE = '__test__' suite = unittest.TestSuite() basedir = os.path.dirname(__file__) + testDirs = [] + + # the os.walk help mentions relative paths as being quirky + # I was tired of adding dirs to the list, so now we add __test__ + # to each dir we want tested. + for root, dirs, files in os.walk(os.getcwd()): + if ".svn" in dirs: + dirs.remove('.svn') + if TEST_FILE in files: + testDirs.append(root) + for mydir in testDirs: suite.addTests(getTests(os.path.join(basedir, mydir), basedir) ) return TextTestRunner(verbosity=2).run(suite) diff --git a/pym/portage/tests/bin/__test__ b/pym/portage/tests/bin/__test__ new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/pym/portage/tests/bin/__test__ diff --git a/pym/portage/tests/dep/__test__ b/pym/portage/tests/dep/__test__ new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/pym/portage/tests/dep/__test__ diff --git a/pym/portage/tests/env/__test__ b/pym/portage/tests/env/__test__ new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/pym/portage/tests/env/__test__ diff --git a/pym/portage/tests/env/config/__test__ b/pym/portage/tests/env/config/__test__ new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/pym/portage/tests/env/config/__test__ diff --git a/pym/portage/tests/util/__test__ b/pym/portage/tests/util/__test__ new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/pym/portage/tests/util/__test__ diff --git a/pym/portage/tests/versions/__test__ b/pym/portage/tests/versions/__test__ new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/pym/portage/tests/versions/__test__ diff --git a/pym/portage/tests/xpak/__test__ b/pym/portage/tests/xpak/__test__ new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/pym/portage/tests/xpak/__test__ |