From: Jason Etheridge Date: Fri, 13 Dec 2019 06:16:34 +0000 (-0500) Subject: tweak output paths X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8f8e00bc90c2084a5f7392140104765faae8a58b;p=working%2Frandom.git tweak output paths so that the tests run in their permanent archive/ location and that RSS feeds link to said locations Signed-off-by: Jason Etheridge --- diff --git a/qa/test.sh b/qa/test.sh index 11d96d5b4..b8a0a47aa 100755 --- a/qa/test.sh +++ b/qa/test.sh @@ -22,25 +22,31 @@ echo "*** Pushing installer script to $TARGET_USER@$TARGET_HOST:$TARGET_PATH" scp installer/stretch/installer_installer.sh $TARGET_USER@$TARGET_HOST:$TARGET_PATH || exit -1 echo "*** Script pushed" -echo "*** Archiving previous test run" +echo "*** Location for new test run" cd $LOCAL_HTML_PATH || exit -1 -export ARCHIVE_DIR=`date +%Y-%m` || exit -1 -export ARCHIVE_SUBDIR=`date +%F_%T` || exit -1 -mkdir -p archive/$ARCHIVE_DIR/$ARCHIVE_SUBDIR || exit -1 -mv *.* archive/$ARCHIVE_DIR/$ARCHIVE_SUBDIR || exit -1 -cp archive/$ARCHIVE_DIR/$ARCHIVE_SUBDIR/*.hash . || exit -1 -echo "*** Test archived" +export TEST_MAINDIR=`date +%Y-%m` || exit -1 +export TEST_SUBDIR=`date +%F_%T` || exit -1 +export TESTDIR=archive/$TEST_MAINDIR/$TEST_SUBDIR +mkdir -p $TESTDIR || exit -1 +cp *.hash $TESTDIR || exit -1 +cp pass_fail.txt.prev $TESTDIR || exit -1 +echo "*** Location created" echo "*** Setting up new output" +cp $LOCAL_QA_GIT_PATH/qa/test_output.css $TESTDIR cp $LOCAL_QA_GIT_PATH/qa/test_output.css . -echo '

Testing in progress

[Previous Runs]' > test.html -ln -s test.html index.html +echo '

Testing in progress

[Previous Runs]' > test.html +ln -s test.html $TESTDIR/index.html +echo '
  • '$TEST_SUBDIR'' `cat index.html` > index.html echo "*** Ready to test!" echo -n "*** Test starting ... " -ssh $TARGET_USER@$TARGET_HOST $TARGET_PATH/installer_installer.sh 2>&1 | tee output.txt +ssh $TARGET_USER@$TARGET_HOST $TARGET_PATH/installer_installer.sh 2>&1 | tee $TESTDIR/output.txt echo "test run complete." echo "*** Creating web output" +cd $TESTDIR $LOCAL_QA_GIT_PATH/qa/test_output_webifier.pl output.txt - +cp test_rss.xml $LOCAL_HTML_PATH +cp *.hash $LOCAL_HTML_PATH +cp pass_fail.txt.prev $LOCAL_HTML_PATH diff --git a/qa/test_output_webifier.pl b/qa/test_output_webifier.pl index e9a95cf17..5527ea9f4 100755 --- a/qa/test_output_webifier.pl +++ b/qa/test_output_webifier.pl @@ -24,7 +24,7 @@ open MAIN_PAGE, ">test.html"; print MAIN_PAGE html_header('Test Output Summary'); print MAIN_PAGE qq^[test.sh output]\n^; print MAIN_PAGE qq^[installer_installer.sh output]\n^; -print MAIN_PAGE qq^[Previous Runs]\n^; +print MAIN_PAGE qq^[Previous Runs]\n^; print MAIN_PAGE qq^[Git]\n^; print MAIN_PAGE qq^[First Failure]\n^; @@ -334,6 +334,7 @@ sub branch_tips { } sub update_rss { + my $testdir = `pwd`; chomp $testdir; $testdir =~ s/.*public_html//; `touch pass_fail.txt.prev`; #if (`diff pass_fail.txt pass_fail.txt.prev`) { $fail = `grep Failed pass_fail.txt`; @@ -356,7 +357,7 @@ sub update_rss { Testing Success - http://testing.evergreen-ils.org/~live#^ . `date -Ins` . q^ + http://testing.evergreen-ils.org/~live/^ . $testdir . q^/ ^ . `date -Iseconds` . q^ All tests succeeded @@ -374,8 +375,8 @@ sub update_rss { print RSS_FILE q^ ^ . $f_details . q^ - - http://testing.evergreen-ils.org/~live/test.^ . $f_subpage_count . q^.html#^ . `date -Ins` . '-' . ($fidx++) . q^ + + http://testing.evergreen-ils.org/~live/^ . $testdir . q^/test.^ . $f_subpage_count . q^.html ^ . `date -Iseconds` . q^ ^ . $f_details . q^