diff options
author | Sorin Sbarnea <ssbarnea@redhat.com> | 2018-06-19 13:33:34 +0100 |
---|---|---|
committer | Sorin Sbarnea <ssbarnea@redhat.com> | 2018-06-19 23:25:43 +0100 |
commit | 92f28a591e835096379c4b9c18ecc95201b7bc43 (patch) | |
tree | fd6be8efbee99ee6c06b19f1f8eec36b7aced2db /tools | |
parent | 51a4ccab70caba694fbf113548cf564139b0c0c8 (diff) | |
download | python-jenkins-job-builder-92f28a591e835096379c4b9c18ecc95201b7bc43.tar.gz python-jenkins-job-builder-92f28a591e835096379c4b9c18ecc95201b7bc43.tar.xz python-jenkins-job-builder-92f28a591e835096379c4b9c18ecc95201b7bc43.zip |
Allow jjb to be called as a module
Enable us to do `python -m jenkins_jobs ...`
which avoids the need to install executable in
user path.
Tests cli execution on each supported python version.
Uses default encoding workaround only on
python2, where is needed.
Change-Id: I4cd79fd51a8309d532e0e76723ecfbbda3e1ca6f
Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/test-commands.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/test-commands.sh b/tools/test-commands.sh new file mode 100755 index 00000000..f44c46b0 --- /dev/null +++ b/tools/test-commands.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -exou pipefail + +VAL1=$(jenkins-jobs --version 2>&1) || exit 1 +VAL2=$(python -m jenkins_jobs --version 2>&1) || exit 2 + +# we assure that both calling methods to get the same output +[ "${VAL1}" == "${VAL2}" ] || exit 3 |