diff --git a/tests/acceptance/run.sh b/tests/acceptance/run.sh index 791604a4dfda..1f2f7d6f9709 100755 --- a/tests/acceptance/run.sh +++ b/tests/acceptance/run.sh @@ -50,6 +50,15 @@ then echo "Check the setting of EXPECTED_FAILURES_FILE environment variable" exit 1 fi + # If the last line of the expected-failures file ends without a newline character + # then that line may not get processed by some of the bash code in this script + # So check that the last character in the file is a newline + if [ $(tail -c1 "${EXPECTED_FAILURES_FILE}" | wc -l) -eq 0 ] + then + echo "Expected failures file ${EXPECTED_FAILURES_FILE} must end with a newline" + echo "Put a newline at the end of the last line and try again" + exit 1 + fi fi # Default to testing a local system