diff --git a/scripts/run-local-test b/scripts/run-local-test index debd1a0f9..9e724e6f8 100755 --- a/scripts/run-local-test +++ b/scripts/run-local-test @@ -15,17 +15,26 @@ # under the License. -## Shell Opts ---------------------------------------------------------------- - -set -o pipefail -set -xeuo +## Functions ----------------------------------------------------------------- +function usage { + echo "Usage: ROLE_NAME=ROLE_NAME ${0##*/} or ${0##*/} ROLE_NAME" +} ## Vars ---------------------------------------------------------------------- export PROJECT_DIR="$(dirname $(readlink -f ${BASH_SOURCE[0]}))/../" +if [ "${ROLE_NAME}x" = "x" -a "${1}x" = "x" ]; then + usage; + exit 2 +fi export ROLE_NAME="${ROLE_NAME:-$1}" export TRIPLEO_JOB_ANSIBLE_ARGS=${TRIPLEO_JOB_ANSIBLE_ARGS:-""} +## Shell Opts ---------------------------------------------------------------- + +set -o pipefail +set -xeuo + ## Main ---------------------------------------------------------------------- # Source distribution information