Skip to content

Commit

Permalink
Merge pull request #37852 from owncloud/expected-failure-single-feature
Browse files Browse the repository at this point in the history
[Tests-Only] Reporting expected failures when running a single feature
  • Loading branch information
phil-davis authored Aug 28, 2020
2 parents 5e605bc + 1c42450 commit 7b6a4cf
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion tests/acceptance/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1269,8 +1269,25 @@ else
fi
if [ "${UNEXPECTED_SUCCESS}" = true ]
then
ACTUAL_UNEXPECTED_PASS=()
# if running a single feature or a single scenario
if [[ -n "${BEHAT_FEATURE}" ]]
then
for unexpected_passed_value in "${UNEXPECTED_PASSED_SCENARIOS[@]}"
do
# check only for the running feature
if [[ $BEHAT_FEATURE == *"${unexpected_passed_value}" ]]
then
ACTUAL_UNEXPECTED_PASS+="${unexpected_passed_value}"
fi
done
else
ACTUAL_UNEXPECTED_PASS="${UNEXPECTED_PASSED_SCENARIOS[@]}"
fi

tput setaf 3; echo "runsh: Total unexpected passed scenarios throughout the test run:"
tput setaf 1; printf "%s\n" "${UNEXPECTED_PASSED_SCENARIOS[@]}"
tput setaf 1; printf "%s\n" "${ACTUAL_UNEXPECTED_PASS[@]}"

else
tput setaf 2; echo "runsh: There were no unexpected success."
fi
Expand Down

0 comments on commit 7b6a4cf

Please sign in to comment.