jenkins-job-builder/tools/test-commands.sh
Sorin Sbarnea 92f28a591e
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>
2018-06-19 23:25:43 +01:00

9 lines
233 B
Bash
Executable File

#!/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