diff options
author | varac <varacanero@zeromail.org> | 2014-08-26 11:31:19 +0000 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2014-08-26 11:31:19 +0000 |
commit | 351363f7d9da8c524fa0138cae5be3ad55f04285 (patch) | |
tree | 3614be1908155a38a3f62807ddbcc19ab0947634 /leap-platform-test | |
parent | f68e33ca1e736ebca506a17cc446a9f93f821501 (diff) |
added run_tests
Diffstat (limited to 'leap-platform-test')
-rwxr-xr-x | leap-platform-test | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/leap-platform-test b/leap-platform-test index f49630b..1b1f131 100755 --- a/leap-platform-test +++ b/leap-platform-test @@ -183,6 +183,7 @@ reset_deploy() { # have finished echo "Waiting for last deploy process has finished..." wait + if [ ! -e $deploy_failure -a -n $MAIL_TO ] then @@ -192,7 +193,6 @@ reset_deploy() { echo "Sending success mail to $MAIL_TO" printf "$msg" | /usr/sbin/sendmail -t - fi } @@ -202,6 +202,27 @@ ssh_up () { return $? } +run_tests () { + + date=`date +"%F-%H%M%S"` + TEST_FILTER='net.ssh.authentication.agent.*could not connect to ssh-agent' + + + echo -e "\nRunning leap test on `date`" | tee -a $LOG1 $LOG2 + $LEAP_CMD $OPTS test 2>&1 | egrep -v "$TEST_FILTER" | tee -a $LOG1 $LOG2 + #$LEAP_CMD $OPTS test 2>&1 + test_failure=$? + + if [ $? -ne 0 ] + then + echo 'WARNING - "leap test" failed !' | tee -a $LOG1 $LOG2 + else + echo 'OK - "leap test" is all green !' | tee -a $LOG1 $LOG2 + fi + return $test_failure + +} + update_leap_cli () { cd $LEAP_SRC git pull @@ -301,6 +322,8 @@ done cmd=$1 shift nodelist=$@ +TEST_LOG1="$LOGDIR/test.log" +TEST_LOG2="$LOGDIR/test-$date.log" #echo "config: $config" #echo "cmd: $cmd" @@ -361,6 +384,7 @@ case $cmd in create_provider) create_provider;; deploy) deploy "$nodes";; reset_deploy) reset_deploy "$nodes";; + test) run_tests "$nodes";; (*) usage; echo "Please specify a command."; exit 1;; esac |