diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-06-30 06:24:11 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-06-30 14:32:52 +0200 |
commit | 678609610f4ccbcb19438cbce5d84bd376010596 (patch) | |
tree | f79c8abd8f04d99e586317e426fc05a68992badf /functest/ci/prepare_env.py | |
parent | c426ee40d40434ea3a5d085f7b98d28fcdb063ff (diff) |
Define console_scripts
Only prepare_env.py and run_tests.py remain executable to avoid
breaking the gate.
As soon as the jenkins jobs are updated to run them from $PATH, tox
will be updated to protect against chmod a+x py files. Dockerfile
will be simplified as well.
Change-Id: Iac1a7ceb6b344e800177226ea39919826f6d3735
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/ci/prepare_env.py')
-rwxr-xr-x | functest/ci/prepare_env.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/functest/ci/prepare_env.py b/functest/ci/prepare_env.py index 64fcc925..c633ef82 100755 --- a/functest/ci/prepare_env.py +++ b/functest/ci/prepare_env.py @@ -358,7 +358,7 @@ def print_deployment_info(): handler.get_deployment_info()) -def main(**kwargs): +def prepare_env(**kwargs): try: if not (kwargs['action'] in actions): logger.error('Argument not valid.') @@ -384,9 +384,13 @@ def main(**kwargs): return 0 -if __name__ == '__main__': +def main(): logging.config.fileConfig(pkg_resources.resource_filename( 'functest', 'ci/logging.ini')) parser = PrepareEnvParser() args = parser.parse_args(sys.argv[1:]) - sys.exit(main(**args)) + return prepare_env(**args) + + +if __name__ == '__main__': + sys.exit(main()) |