"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/acceptance/testall" between
cfengine-3.15.3.tar.gz and cfengine-3.15.4.tar.gz

About: CFEngine is a configuration management system for configuring and maintaining Unix-like computers (using an own high level policy language). Community version.

testall  (cfengine-3.15.3):testall  (cfengine-3.15.4)
skipping to change at line 156 skipping to change at line 156
;; ;;
esac esac
GAINROOT=${GAINROOT:-$DEFAULT_GAINROOT} GAINROOT=${GAINROOT:-$DEFAULT_GAINROOT}
PASSED_TESTS=0 PASSED_TESTS=0
FAILED_TESTS=0 FAILED_TESTS=0
SUPPRESSED_FAILURES=0 SUPPRESSED_FAILURES=0
SOFT_FAILURES=0 SOFT_FAILURES=0
SKIPPED_TESTS=0 SKIPPED_TESTS=0
FLAKEY_FAILURES=0
# #
# Many older platforms don't support date +%s, so check for compatibility # Many older platforms don't support date +%s, so check for compatibility
# and find Perl for the unix_seconds() routine below. (Mantis #1254) # and find Perl for the unix_seconds() routine below. (Mantis #1254)
# #
HAVE_DATE_PCT_S= HAVE_DATE_PCT_S=
date +%s | grep %s >/dev/null 2>&1 date +%s | grep %s >/dev/null 2>&1
if [ $? -ne 0 ] if [ $? -ne 0 ]
then then
HAVE_DATE_PCT_S=1 HAVE_DATE_PCT_S=1
skipping to change at line 617 skipping to change at line 618
RESULT=Pass RESULT=Pass
RESULT_MSG="${COLOR_SUCCESS}Pass${COLOR_NORMAL}" RESULT_MSG="${COLOR_SUCCESS}Pass${COLOR_NORMAL}"
elif egrep "R: .*$ESCAPED_TEST Skip/unsupported" $OUTFILE > /dev/nul l elif egrep "R: .*$ESCAPED_TEST Skip/unsupported" $OUTFILE > /dev/nul l
then then
RESULT=Skip RESULT=Skip
RESULT_MSG="${COLOR_WARNING}Skipped (No platform support)${COLOR _NORMAL}" RESULT_MSG="${COLOR_WARNING}Skipped (No platform support)${COLOR _NORMAL}"
elif egrep "R: .*$ESCAPED_TEST Skip/needs_work" $OUTFILE > /dev/null elif egrep "R: .*$ESCAPED_TEST Skip/needs_work" $OUTFILE > /dev/null
then then
RESULT=Skip RESULT=Skip
RESULT_MSG="${COLOR_WARNING}Skipped (Test needs work)${COLOR_NOR MAL}" RESULT_MSG="${COLOR_WARNING}Skipped (Test needs work)${COLOR_NOR MAL}"
elif egrep "R: .*$ESCAPED_TEST FLAKEY" $OUTFILE > /dev/null
then
RESULT=FLAKEY
TICKET="$(egrep "R: .*$ESCAPED_TEST FLAKEY" $OUTFILE | sed -e "s
,.*FLAKEY/\(.*\),\1,")"
RESULT_MSG="${COLOR_WARNING}Flakey fail ($TICKET)${COLOR_NORMAL}
"
else else
RESULT=FAIL RESULT=FAIL
RESULT_MSG="${COLOR_FAILURE}FAIL${COLOR_NORMAL}" RESULT_MSG="${COLOR_FAILURE}FAIL${COLOR_NORMAL}"
fi fi
fi fi
if [ "x$RESULT_MSG" = "x" ] if [ "x$RESULT_MSG" = "x" ]
then then
RESULT_MSG=$RESULT RESULT_MSG=$RESULT
fi fi
skipping to change at line 1027 skipping to change at line 1034
then then
ALL_TESTS="$ALL_TESTS${ALL_TESTS:+ }$test" ALL_TESTS="$ALL_TESTS${ALL_TESTS:+ }$test"
elif [ -d $test ] elif [ -d $test ]
then then
ALL_TESTS="$ALL_TESTS${ALL_TESTS:+ }$(find "$test" -name workdir -pr une -o -name '*.cf' -print | sort)" ALL_TESTS="$ALL_TESTS${ALL_TESTS:+ }$(find "$test" -name workdir -pr une -o -name '*.cf' -print | sort)"
else else
echo "Unable to open test file/directory: $test" echo "Unable to open test file/directory: $test"
fi fi
done done
else else
ALL_TESTS="$ALL_TESTS${ALL_TESTS:+ }$(find . -name workdir -prune -o -name ' *.cf' -print | sort)" ALL_TESTS="$ALL_TESTS${ALL_TESTS:+ }$(find . \( -name selftest -o -name work dir \) -prune -o -name '*.cf' -print | sort)"
fi fi
for addtest in $ALL_TESTS for addtest in $ALL_TESTS
do do
if echo "$addtest" | fgrep "/timed/" > /dev/null if echo "$addtest" | fgrep "/timed/" > /dev/null
then then
if [ "$TIMED_TESTS" = 1 ] if [ "$TIMED_TESTS" = 1 ]
then then
eval TESTS_TIMED_$TEST_TIMED_INDEX="$addtest" eval TESTS_TIMED_$TEST_TIMED_INDEX="$addtest"
eval TESTS_TIMEOUT_$TEST_TIMED_INDEX=0 eval TESTS_TIMEOUT_$TEST_TIMED_INDEX=0
skipping to change at line 1094 skipping to change at line 1101
echo echo
) | tee "$LOG" | tee "$SUMMARY" >&7 ) | tee "$LOG" | tee "$SUMMARY" >&7
} }
print_footer() { print_footer() {
# Recalculate results since sub invocations may not have been recorded. # Recalculate results since sub invocations may not have been recorded.
PASSED_TESTS=`egrep '^Pass ' $SUMMARY | wc -l | tr -d ' '` PASSED_TESTS=`egrep '^Pass ' $SUMMARY | wc -l | tr -d ' '`
FAILED_TESTS=`egrep '^(FAIL|XFAIL) ' $SUMMARY | wc -l | tr -d ' '` FAILED_TESTS=`egrep '^(FAIL|XFAIL) ' $SUMMARY | wc -l | tr -d ' '`
SUPPRESSED_FAILURES=`egrep '^XFAIL ' $SUMMARY | wc -l | tr -d ' '` SUPPRESSED_FAILURES=`egrep '^XFAIL ' $SUMMARY | wc -l | tr -d ' '`
SOFT_FAILURES=`egrep '^SFAIL ' $SUMMARY | wc -l | tr -d ' '` SOFT_FAILURES=`egrep '^SFAIL ' $SUMMARY | wc -l | tr -d ' '`
FLAKEY_FAILURES=`egrep '^FLAKEY ' $SUMMARY | wc -l | tr -d ' '`
SKIPPED_TESTS=`egrep '^Skip ' $SUMMARY | wc -l | tr -d ' '` SKIPPED_TESTS=`egrep '^Skip ' $SUMMARY | wc -l | tr -d ' '`
( echo ( echo
echo ===================================================================== = echo ===================================================================== =
echo "Testsuite finished at $(date "+%F %T") ($(($END_TIME - $START_TIME) ) seconds)" echo "Testsuite finished at $(date "+%F %T") ($(($END_TIME - $START_TIME) ) seconds)"
) | tee -a "$LOG" | tee -a "$SUMMARY" >&7 ) | tee -a "$LOG" | tee -a "$SUMMARY" >&7
( echo ( echo
echo "Passed tests: $PASSED_TESTS" echo "Passed tests: $PASSED_TESTS"
printf "Failed tests: $FAILED_TESTS" printf "Failed tests: $FAILED_TESTS"
if [ $SUPPRESSED_FAILURES -gt 0 ] if [ $SUPPRESSED_FAILURES -gt 0 ]
then then
echo " ($SUPPRESSED_FAILURES are known and suppressed)" echo " ($SUPPRESSED_FAILURES are known and suppressed)"
else else
echo echo
fi fi
echo "Skipped tests: $SKIPPED_TESTS" echo "Skipped tests: $SKIPPED_TESTS"
echo "Soft failures: $SOFT_FAILURES" echo "Soft failures: $SOFT_FAILURES"
echo "Total tests: $TESTS_COUNT" echo "Flakey failures: $FLAKEY_FAILURES"
echo "Total tests: $TESTS_COUNT"
) | tee -a "$LOG" | tee -a "$SUMMARY" ) | tee -a "$LOG" | tee -a "$SUMMARY"
if [ -n "$PRINTLOG" ] if [ -n "$PRINTLOG" ]
then then
cat "$LOG" cat "$LOG"
fi fi
} }
finish_xml() { finish_xml() {
mv "$XML" xml.tmp mv "$XML" xml.tmp
skipping to change at line 1354 skipping to change at line 1363
run_all_tests_using_make run_all_tests_using_make
fi fi
END_TIME=$(unix_seconds) END_TIME=$(unix_seconds)
if [ -z "$STAY_IN_WORKDIR" ] if [ -z "$STAY_IN_WORKDIR" ]
then then
# This is top level invocation. # This is top level invocation.
print_footer print_footer
finish_xml finish_xml
fi fi
if [ $(($PASSED_TESTS+$FAILED_TESTS+$SOFT_FAILURES+$SKIPPED_TESTS)) -ne $TESTS_C OUNT ] if [ $(($PASSED_TESTS+$FAILED_TESTS+$SOFT_FAILURES+$SKIPPED_TESTS+$FLAKEY_FAILUR ES)) -ne $TESTS_COUNT ]
then then
echo "WARNING: Number of test results does not match number of tests!" echo "WARNING: Number of test results does not match number of tests!"
echo "Did something go wrong during execution?" echo "Did something go wrong during execution?"
exit 2 exit 2
fi fi
if [ "$FAILED_TESTS" -gt "$SUPPRESSED_FAILURES" ] if [ "$FAILED_TESTS" -gt "$SUPPRESSED_FAILURES" ]
then then
exit 1 exit 1
elif [ "$FLAKEY_FAILURES" -gt "0" ] && [ -n "$FLAKEY_IS_FAIL" ]
then
exit 4
else else
exit 0 exit 0
fi fi
 End of changes. 8 change blocks. 
7 lines changed or deleted 21 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)