summaryrefslogtreecommitdiff
path: root/lib/zephyr_tests.py
diff options
context:
space:
mode:
authorGravatar Karl Ramm <kcr@1ts.org>2009-04-14 00:11:01 +0000
committerGravatar Karl Ramm <kcr@1ts.org>2009-04-14 00:11:01 +0000
commit57ce1838dd5f6c54ea340e08a8e62a16e0377689 (patch)
tree236817959066526ec0301d000cd0dd960c89b7f3 /lib/zephyr_tests.py
parent62a81ca8f4d116da03c788ebc42b5aa9f4d7c893 (diff)
run the tests from make
Diffstat (limited to 'lib/zephyr_tests.py')
-rwxr-xr-xlib/zephyr_tests.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/zephyr_tests.py b/lib/zephyr_tests.py
index dcc275d..04784c1 100755
--- a/lib/zephyr_tests.py
+++ b/lib/zephyr_tests.py
@@ -469,8 +469,7 @@ class ZephyrTestSuite(TestSuite):
assert self._libzephyr.ZExpandRealm("localhost") == ""
assert self._libzephyr.ZExpandRealm("bitsy.mit.edu") == "ATHENA.MIT.EDU"
-
-if __name__ == "__main__":
+def find_buildpath():
parser = optparse.OptionParser(usage=__doc__,
version = "%%prog %s" % __version__)
parser.add_option("--builddir", default="..",
@@ -478,7 +477,10 @@ if __name__ == "__main__":
opts, args = parser.parse_args()
assert not args, "no args yet"
- tester = ZephyrTestSuite(builddir=os.path.join(opts.builddir, "lib"))
+ return os.path.join(opts.builddir, "lib")
+
+if __name__ == "__main__":
+ tester = ZephyrTestSuite(builddir=find_buildpath())
tester.setup()
failures = tester.run()
tester.cleanup()