From 56a7d2031fd35ec97cc63b2dd44adae1a5655885 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Thu, 26 Dec 2013 13:14:46 -0500 Subject: [PATCH] some tweaks by miker to the test launcher Signed-off-by: Jason Etheridge --- qa/test.sh | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/qa/test.sh b/qa/test.sh index 623f640b2..b4ffefa22 100755 --- a/qa/test.sh +++ b/qa/test.sh @@ -1,22 +1,45 @@ #!/bin/bash +. /home/live/.bashrc + export TARGET_USER=esi export TARGET_HOST=192.168.25.129 export TARGET_PATH=/home/esi/ export LOCAL_QA_GIT_PATH=/home/live/git/random/ export LOCAL_QA_BRANCH=collab/phasefx/wheezy_installer export LOCAL_HTML_PATH=/home/live/public_html/ -cd ${LOCAL_QA_GIT_PATH} || exit -1 -git checkout ${LOCAL_QA_BRANCH} || exit -1 + +echo -n "*** Changing to $LOCAL_QA_GIT_PATH ... " +cd $LOCAL_QA_GIT_PATH || exit -1 +echo "location changed" + +echo "*** Checking out $LOCAL_QA_BRANCH ..." +git checkout $LOCAL_QA_BRANCH || exit -1 git fetch --all || exit -1 git pull || exit -1 -scp installer/wheezy/installer_installer.sh ${TARGET_USER}@${TARGET_HOST}:${TARGET_PATH} || exit -1 -cd ${LOCAL_HTML_PATH} || exit -1 +echo "*** Local branch updated" + +echo "*** Pushing installer script to $TARGET_USER@$TARGET_HOST:$TARGET_PATH" +scp installer/wheezy/installer_installer.sh $TARGET_USER@$TARGET_HOST:$TARGET_PATH || exit -1 +echo "*** Script pushed" + +echo "*** Archiving previous test run" +cd $LOCAL_HTML_PATH || exit -1 export ARCHIVE_DIR=`date +%F_%T` || exit -1 -mkdir -p archive/${ARCHIVE_DIR} || exit -1 -mv *.* archive/${ARCHIVE_DIR} || exit -1 -cp archive/${ARCHIVE_DIR}/*.hash . || exit -1 -cp ${LOCAL_QA_GIT_PATH}qa/test_output.css . -echo '

Testing in progress

previous runs' > test.html +mkdir -p archive/$ARCHIVE_DIR || exit -1 +mv *.* archive/$ARCHIVE_DIR || exit -1 +cp archive/$ARCHIVE_DIR/*.hash . || exit -1 +echo "*** Test archived" + +echo "*** Setting up new output" +cp $LOCAL_QA_GIT_PATH/qa/test_output.css . +echo '

Testing in progress

Previous runs...' > test.html ln -s test.html index.html -ssh ${TARGET_USER}@${TARGET_HOST} ${TARGET_PATH}installer_installer.sh 2>&1 | tee output.txt -${LOCAL_QA_GIT_PATH}qa/test_output_webifier.pl output.txt +echo "*** Ready to test!" + +echo -n "*** Test starting ... " +ssh $TARGET_USER@$TARGET_HOST $TARGET_PATH/installer_installer.sh 2>&1 > output.txt +echo "test run complete." + +echo "*** Creating web output" +$LOCAL_QA_GIT_PATH/qa/test_output_webifier.pl output.txt + -- 2.43.2