You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bn...@apache.org on 2021/07/20 22:36:55 UTC
[trafficserver] branch master updated: CI: allow whitespace in
*.test_input test files (#8101)
This is an automated email from the ASF dual-hosted git repository.
bneradt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 099b55e CI: allow whitespace in *.test_input test files (#8101)
099b55e is described below
commit 099b55e9c1fa0636c19265db9cfda1f6f7376b41
Author: Brian Neradt <br...@gmail.com>
AuthorDate: Tue Jul 20 18:36:46 2021 -0400
CI: allow whitespace in *.test_input test files (#8101)
Some of our test input files require trailing white space. We already
allow this for `*.gold` files. Naming all such input files `*.gold`
which are not in fact gold files would be confusing. This tweaks our CI
formatting check to also ignore the more generic `.test_input` extension
so that people writing tests with trailing white space can use that
extension to skip the trailing white space check in ci.
---
ci/jenkins/bin/clang-format.sh | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/ci/jenkins/bin/clang-format.sh b/ci/jenkins/bin/clang-format.sh
index dd37eca..f9c7fbf 100755
--- a/ci/jenkins/bin/clang-format.sh
+++ b/ci/jenkins/bin/clang-format.sh
@@ -20,7 +20,9 @@ set +x
cd "${WORKSPACE}/src"
# First, make sure there are no trailing WS!!!
-git grep -IE ' +$' | fgrep -v '.gold:'
+git grep -IE ' +$' | \
+ fgrep -v '.gold:' | \
+ fgrep -v '.test_input'
if [ "1" != "$?" ]; then
echo "Error: Trailing whitespaces are not allowed!"
echo "Error: Please run: git grep -IE ' +$'"
@@ -29,7 +31,9 @@ fi
echo "Success! No trailing whitespace"
# Make sure there are no DOS shit here.
-git grep -IE $'\r$' | fgrep -v 'lib/yamlcpp'
+git grep -IE $'\r$' | \
+ fgrep -v 'lib/yamlcpp' | \
+ fgrep -v '.test_input'
if [ "1" != "$?" ]; then
echo "Error: Please make sure to run dos2unix on the above file(s)"
exit 1