summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-09-19 02:43:22 +0000
committerGerrit Code Review <review@openstack.org>2014-09-19 02:43:22 +0000
commit0ade1d96d04a5ee23468884edd51460a67191e47 (patch)
treec29fd8bc6006fc8bbf766bbe0016eb61fde0dc41
parentd5464d5b137daff4d75f3dd6b4c2417ab76fa93e (diff)
parentd2e4040b8bcaccccc46c66f7f238379048d5bfba (diff)
downloadtempest-lib-0ade1d96d04a5ee23468884edd51460a67191e47.tar.gz
Merge "Setup subunit-trace as an entry point"
-rw-r--r--doc/source/index.rst1
-rw-r--r--setup.cfg4
-rw-r--r--tempest_lib/cmd/__init__.py0
-rwxr-xr-xtempest_lib/cmd/subunit_trace.py (renamed from tempest_lib/subunit-trace.py)6
4 files changed, 8 insertions, 3 deletions
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 1416604..d2a94bd 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -23,6 +23,7 @@ Release Notes
0.0.1
-----
* Adds cli testing framework
+ * Adds subunit-trace
Indices and tables
diff --git a/setup.cfg b/setup.cfg
index 133bcae..a6e66b0 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -25,6 +25,10 @@ classifier =
packages =
tempest_lib
+[entry_points]
+console_scripts =
+ subunit-trace = tempest_lib.cmd.subunit_trace:main
+
[build_sphinx]
source-dir = doc/source
build-dir = doc/build
diff --git a/tempest_lib/cmd/__init__.py b/tempest_lib/cmd/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tempest_lib/cmd/__init__.py
diff --git a/tempest_lib/subunit-trace.py b/tempest_lib/cmd/subunit_trace.py
index 57e58f2..0594170 100755
--- a/tempest_lib/subunit-trace.py
+++ b/tempest_lib/cmd/subunit_trace.py
@@ -236,12 +236,12 @@ def main():
result.stopTestRun()
if count_tests('status', '.*') == 0:
print("The test run didn't actually run any tests")
- return 1
+ exit(1)
if args.post_fails:
print_fails(sys.stdout)
print_summary(sys.stdout)
- return (0 if summary.wasSuccessful() else 1)
+ exit(0 if summary.wasSuccessful() else 1)
if __name__ == '__main__':
- sys.exit(main())
+ main()