Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a stop-on-skip option to the script that runs multiple integtests #326

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions scripts/dfmodules_integtest_bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Options:
-n <number of times to run each individual test, default=1>
-N <number of times to run the full set of selected tests, default=1>
--stop-on-failure : causes the script to stop when one of the integtests reports a failure
--stop-on-skip : causes the script to stop when one of the integtests skips a test
"""
let counter=0
echo "List of available tests:"
Expand All @@ -27,7 +28,7 @@ Options:
echo ""
}

TEMP=`getopt -o hs:f:l:n:N: --long help,stop-on-failure -- "$@"`
TEMP=`getopt -o hs:f:l:n:N: --long help,stop-on-failure,stop-on-skip -- "$@"`
eval set -- "$TEMP"

let session_number=1
Expand All @@ -36,6 +37,7 @@ let last_test_index=999
let individual_run_count=1
let overall_run_count=1
let stop_on_failure=0
let stop_on_skip=0

while true; do
case "$1" in
Expand Down Expand Up @@ -67,6 +69,10 @@ while true; do
let stop_on_failure=1
shift
;;
--stop-on-skip)
let stop_on_skip=1
shift
;;
--)
shift
break
Expand Down Expand Up @@ -102,7 +108,16 @@ while [[ ${overall_loop_count} -lt ${overall_run_count} ]]; do
let individual_loop_count=${individual_loop_count}+1

if [[ ${stop_on_failure} -gt 0 ]]; then
if [[ ${pytest_return_code} -ne 0 ]]; then
search_result=`tail -20 ${ITGRUNNER_LOG_FILE} | grep -i fail`
#echo "failure search result is ${search_result}"
if [[ ${search_result} != "" || ${pytest_return_code} -ne 0 ]]; then
break 3
fi
fi
if [[ ${stop_on_skip} -gt 0 ]]; then
search_result=`tail -20 ${ITGRUNNER_LOG_FILE} | grep -i skip`
#echo "skip search result is ${search_result}"
if [[ ${search_result} != "" ]]; then
break 3
fi
fi
Expand Down