diff --git a/py-scripts/regression_test.sh b/py-scripts/regression_test.sh index 33ef1735..51b69d88 100755 --- a/py-scripts/regression_test.sh +++ b/py-scripts/regression_test.sh @@ -20,12 +20,7 @@ Help() echo "If using the help flag, put the H flag at the end of the command after other flags." } -if [ -d "/home/lanforge/lanforge_env" ]; -then - pip3 install --upgrade lanforge-scripts -else - pip3 install --user -r ../requirements.txt --upgrade -fi +if [ -d "/home/lanforge/lanforge_env"] && pip3 install --upgrade lanforge-scripts || pip3 install --user -r ../requirements.txt --upgrade while getopts ":h:s:S:p:w:m:A:r:F:B:U:D:H:" option; do case "${option}" in @@ -529,13 +524,13 @@ function test() { STDERR="STDERR" else echo "No errors detected" + results+=("${CURR_TEST_NAME} + ${testcommand} + Success + ${execution} + STDOUT + ") fi - results+=("${CURR_TEST_NAME} - ${testcommand} - ${TDTEXT} - ${execution} - STDOUT - ${STDERR}") } function start_tests() { @@ -562,51 +557,54 @@ function start_tests() { function html_generator() { LAST_COMMIT=$(git log --pretty=oneline | head -n 1) - header=" - - Regression Test Results $NOW - - - - -

Regression Results

-

$NOW

-

$LAST_COMMIT

- - - - - - - - - " - tail=" - " + header=" + + +Regression Test Results $NOW + + + + +

Regression Results

+

$NOW

+

$LAST_COMMIT

+
Command NameCommandStatusExecution timeSTDOUTSTDERR
+ + + + + + + + + + + " + tail="" fname="${HOMEPATH}/html-reports/regression_file-${NOW}.html" echo "$header" >> "$fname"
Command NameCommandStatusExecution timeSTDOUTSTDERR