Ensure that only normalized test output is commited

pull/3336/head
Jelte Fennema 2019-12-23 16:14:37 +01:00
parent 8fae3ed800
commit 9a819d401a
2 changed files with 13 additions and 0 deletions

View File

@ -34,6 +34,12 @@ jobs:
- run:
name: 'Check if changed'
command: git diff --cached --exit-code
- run:
name: 'Normalize test output'
command: ci/normalize_expected.sh
- run:
name: 'Check if changed'
command: git diff --cached --exit-code
check-sql-snapshots:
docker:
- image: 'citus/extbuilder:latest'

7
ci/normalize_expected.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
set -eu
for f in $(git ls-tree -r HEAD --name-only src/test/regress/expected/*.out); do
sed -Ef src/test/regress/bin/normalize.sed < "$f" > "$f.modified"
mv "$f.modified" "$f"
done