summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2014-12-10 19:31:41 +0000
committervarac <varacanero@zeromail.org>2014-12-10 19:31:41 +0000
commitda24798df6a6204ffe78d16da42d4090de8ab355 (patch)
treec999497c89151e8b139c32d2fe2e0e3024e31d12
parent76de9919d0b27a9eb66f096713e0fc9e411c880e (diff)
show test option in the usage, don't check for running instances on test
-rwxr-xr-xleap-platform-test29
1 files changed, 21 insertions, 8 deletions
diff --git a/leap-platform-test b/leap-platform-test
index 91f06a9..4a7e30e 100755
--- a/leap-platform-test
+++ b/leap-platform-test
@@ -26,7 +26,7 @@ COMMANDS
create_provider creates a provider instance
deploy <node(s)> deploy node(s)
reset_deploy <node(s)> reset and deploy node(s)
-
+ test <node(s)> run leap test
EOF
}
@@ -53,6 +53,9 @@ add_nodes() {
bootstrap_nodes() {
+
+ check_for_running_instances
+
for vm in $@
do
$LEAP_CMD $OPTS local start "$vm"
@@ -63,14 +66,27 @@ bootstrap_nodes() {
# make sure machines are rebooted in order to be able to load kernel modules after a kernel update
# https://leap.se/code/issues/6494
- cd test
+ cd ${PROVIDERDIR}/test
vagrant reload $vm
$LEAP_CMD $OPTS local save "$vm"
done
}
+check_for_running_instances() {
+
+ if [[ $( pidof -x "$( basename "$0" )" -o %PPID ) ]]
+ then
+ echo "Other process(es) found running for $(basename "$0") - exiting."
+ exit 1
+ fi
+
+}
+
create_provider() {
+
+ check_for_running_instances
+
if [ -e "$PROVIDERDIR" ]
then
echo "$PROVIDERDIR" exists - exiting
@@ -171,6 +187,8 @@ log_start() {
reset_deploy() {
+ check_for_running_instances
+
local nodes="$*"
update_platform
update_leap_cli
@@ -237,7 +255,7 @@ run_tests () {
echo -e "\nRunning leap test on $date" | tee -a "$TEST_LOG1" "$TEST_LOG2"
- $LEAP_CMD "$OPTS" test --continue 2>&1 | egrep -v "$TEST_FILTER" | tee -a "$TEST_LOG1" "$TEST_LOG2"
+ $LEAP_CMD $OPTS test --continue 2>&1 | egrep -v "$TEST_FILTER" | tee -a "$TEST_LOG1" "$TEST_LOG2"
test_failure=${PIPESTATUS[0]}
if [ "$test_failure" -ne 0 ]
@@ -390,11 +408,6 @@ else
nodes=$nodelist
fi
-if [[ $( pidof -x "$( basename "$0" )" -o %PPID ) ]]
-then
- echo "Other process(es) found running for $(basename "$0") - exiting."
- exit 1
-fi
case $cmd in
add_nodes) add_nodes "$nodes";;