-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We test actually applying all of our real patches on release branches, but this adds testing on the master branch of the patch system itself. It works in basically the same way as our inplace upgrade tests: by creating a database, and then applying a diff that makes some synthetic testing changes to the server/compiler. I (re)discovered some various frustrating limitations of the patch system while doing this, but haven't fixed those yet. Fixes #5804.
- Loading branch information
Showing
5 changed files
with
707 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash -ex | ||
|
||
while [[ $# -gt 0 ]]; do | ||
case $1 in | ||
--save-tarballs) | ||
SAVE_TARBALLS=1 | ||
shift | ||
;; | ||
*) | ||
break | ||
;; | ||
esac | ||
done | ||
|
||
|
||
DIR="$1" | ||
shift | ||
|
||
if ! git diff-index --quiet HEAD --; then | ||
set +x | ||
echo Refusing to run patching upgrade test with dirty git state. | ||
echo "(The test makes local modifications.)" | ||
exit 1 | ||
fi | ||
|
||
make parsers | ||
|
||
# Setup the test database | ||
edb inittestdb -D "$DIR" "$@" | ||
|
||
|
||
if [ "$SAVE_TARBALLS" = 1 ]; then | ||
tar cf "$DIR".tar "$DIR" | ||
fi | ||
|
||
|
||
# Upgrade to the new version | ||
patch -f -p1 < tests/patch-testing/upgrade.patch | ||
make parsers | ||
|
||
edb server --bootstrap-only --data-dir "$DIR" | ||
|
||
if [ "$SAVE_TARBALLS" = 1 ]; then | ||
tar cf "$DIR"-upgraded.tar "$DIR" | ||
fi | ||
|
||
# Test! | ||
edb test --data-dir "$DIR" --use-data-dir-dbs -v "$@" |
Oops, something went wrong.