summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Raiskup <praiskup@redhat.com>2014-11-24 07:50:05 +0100
committerPavel Raiskup <praiskup@redhat.com>2014-11-24 07:50:05 +0100
commit708a73f4edd0ba8c32c8dfd194d5f0e12373b2a2 (patch)
treed5a3a04d0c00f2612be77bd517141773ba2cfb8f
parent94b4b752b43dd32c0af5b812c9c097b867aaf4d7 (diff)
downloadpostgresql-setup-tests-708a73f4edd0ba8c32c8dfd194d5f0e12373b2a2.tar.gz
postgresql-setup-tests-708a73f4edd0ba8c32c8dfd194d5f0e12373b2a2.tar.xz
postgresql-setup-tests-708a73f4edd0ba8c32c8dfd194d5f0e12373b2a2.zip
controller: option checking in dtf-run-remote
* controller/bin/dtf-run-remote.in: Check that --setup-playbook and --taskdir do point to existing files.
-rw-r--r--controller/bin/dtf-run-remote.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/controller/bin/dtf-run-remote.in b/controller/bin/dtf-run-remote.in
index f617cdb..873b68f 100644
--- a/controller/bin/dtf-run-remote.in
+++ b/controller/bin/dtf-run-remote.in
@@ -98,10 +98,18 @@ test -z "$opt_taskdir" \
&& error "you must specify '--taskdir DIR'" \
&& optparse_error=true
+test ! -d "$opt_taskdir" \
+ && error "\$opt_taskdir is not a directory '$opt_taskdir'" \
+ && optparse_error=true
+
test -z "$opt_setup_playbook" \
&& error "you must specify '--setup-playbook PLAYBOOK'" \
&& optparse_error=true
+test ! -f "$opt_setup_playbook" \
+ && error "bad setup playbook '$opt_setup_playbook'" \
+ && optparse_error=true
+
$optparse_error && exit 1
credsfile="$HOME/.dtf/private/os/$opt_openstack_instance.yml"