diff options
author | Matthew Treinish <mtreinish@kortar.org> | 2014-09-16 17:32:32 -0400 |
---|---|---|
committer | Matthew Treinish <mtreinish@kortar.org> | 2014-09-16 18:18:31 -0400 |
commit | d2e4040b8bcaccccc46c66f7f238379048d5bfba (patch) | |
tree | c1b07125d3debb34e34993f8ff381dc486047fbf | |
parent | adf6b672885cb62062d26b8a09a1b9df8c389f26 (diff) | |
download | tempest-lib-d2e4040b8bcaccccc46c66f7f238379048d5bfba.tar.gz |
Setup subunit-trace as an entry point
This commit moves subunit-trace into the newly created cmd dir and
adds a pbr entry point to run it as a binary. This will enable using
subunit-trace just by installing tempest-lib.
Change-Id: I3ae379edca3e776e90a18d53393c4c1424d291f7
-rw-r--r-- | doc/source/index.rst | 1 | ||||
-rw-r--r-- | setup.cfg | 4 | ||||
-rw-r--r-- | tempest_lib/cmd/__init__.py | 0 | ||||
-rwxr-xr-x | tempest_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 @@ -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() |