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

[tests-only] [full-ci] Check for newline at end of expected-failures file #39726

Merged
merged 1 commit into from
Jan 28, 2022
Merged
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
9 changes: 9 additions & 0 deletions tests/acceptance/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down