Skip to content

Commit

Permalink
Changes for including error test count for re-run logic
Browse files Browse the repository at this point in the history
Signed-off-by: anajosep <anand.francis.joseph.augustin@oracle.com>
  • Loading branch information
anajosep committed Dec 19, 2018
1 parent af16218 commit 6860f57
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
13 changes: 13 additions & 0 deletions docker/jaxrstck.sh
Expand Up @@ -73,6 +73,19 @@ ant deploy.all

cd $TS_HOME/src/com/sun/ts/tests/
ant runclient
# Check if there are any failures in the test. If so, re-run those tests.
FAILED_COUNT=0
ERROR_COUNT=0
FAILED_COUNT=`cat $TCK_HOME/jaxrstckreport/jaxrstck/text/summary.txt | grep 'Failed.' | wc -l`
ERROR_COUNT=`cat $TCK_HOME/jaxrstckreport/jaxrstck/text/summary.txt | grep 'Error.' | wc -l`
if [[ $FAILED_COUNT -gt 0 || $ERROR_COUNT -gt 0 ]]; then
echo "One or more tests failed. Failure count:$FAILED_COUNT/Error count:$ERROR_COUNT"
echo "Re-running only the failed, error tests"
ant -Drun.client.args="-DpriorStatus=fail,error" -DbuildJwsJaxws=false runclient
# Generate combined report for both the runs.
ant -Dreport.for=com/sun/ts/tests/jaxrs -Dreport.dir=$TCK_HOME/jaxrstckreport/jaxrstck -Dwork.dir=$TCK_HOME/jaxrstckwork/jaxrstck report
fi

echo "Test run complete"

TCK_NAME=jaxrstck
Expand Down
6 changes: 4 additions & 2 deletions docker/run_jakartaeetck.sh
Expand Up @@ -352,10 +352,12 @@ fi

# Check if there are any failures in the test. If so, re-run those tests.
FAILED_COUNT=0
ERROR_COUNT=0
TEST_SUITE=`echo "${test_suite}" | tr '/' '_'`
FAILED_COUNT=`cat ${JT_REPORT_DIR}/${TEST_SUITE}/text/summary.txt | grep 'Failed.' | wc -l`
if [[ $FAILED_COUNT -gt 0 ]]; then
echo "One or more tests failed. Failure count: $FAILED_COUNT"
ERROR_COUNT=`cat ${JT_REPORT_DIR}/${TEST_SUITE}/text/summary.txt | grep 'Error.' | wc -l`
if [[ $FAILED_COUNT -gt 0 || $ERROR_COUNT -gt 0 ]]; then
echo "One or more tests failed. Failure count:$FAILED_COUNT/Error count:$ERROR_COUNT"
echo "Re-running only the failed, error tests"
ant -f xml/impl/glassfish/s1as.xml run.cts -Dant.opts="${CTS_ANT_OPTS} ${ANT_OPTS}" -Drun.client.args="-DpriorStatus=fail,error" -DbuildJwsJaxws=false -Dtest.areas="${test_suite}"
# Generate combined report for both the runs.
Expand Down
7 changes: 4 additions & 3 deletions docker/servlettck.sh
Expand Up @@ -68,15 +68,16 @@ ant -Dutil.dir=$TS_HOME deploy.all
ant -Djava.endorsed.dirs=$TS_HOME/endorsedlib -Dutil.dir=$TS_HOME runclient
# Check if there are any failures in the test. If so, re-run those tests.
FAILED_COUNT=0
ERROR_COUNT=0
FAILED_COUNT=`cat $TCK_HOME/servlettckreport/servlettck/text/summary.txt | grep 'Failed.' | wc -l`
if [[ $FAILED_COUNT -gt 0 ]]; then
echo "One or more tests failed. Failure count: $FAILED_COUNT"
ERROR_COUNT=`cat $TCK_HOME/servlettckreport/servlettck/text/summary.txt | grep 'Error.' | wc -l`
if [[ $FAILED_COUNT -gt 0 || $ERROR_COUNT -gt 0 ]]; then
echo "One or more tests failed. Failure count:$FAILED_COUNT/Error count:$ERROR_COUNT"
echo "Re-running only the failed, error tests"
ant -Drun.client.args="-DpriorStatus=fail,error" -DbuildJwsJaxws=false runclient
# Generate combined report for both the runs.
ant -Dreport.for=com/sun/ts/tests/servlet -Dreport.dir=$TCK_HOME/servlettckreport/servlettck -Dwork.dir=$TCK_HOME/servlettckwork/servlettck report
fi

echo "Test run complete"

TCK_NAME=servlettck
Expand Down

0 comments on commit 6860f57

Please sign in to comment.