-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor extension build command handling
The contrib `Dockerfile`s run `./configure && make`, so not only is there no need to do so here, but it was causing issues by running the commands in the parent directory of the unpacked extension directory: ``` Executing in container: "su postgres -c bash -c \"././postgis-3.4.0/configure && make -C ./postgis-3.4.0 check && echo done\"" configure: error: source directory already configured; run "make distclean" there first ``` Apparently `./configure` won't re-run from a different directory unless `make distclean` is run. But it's not even necessary! So remove the check for the `configure` file in `run_tests()`, and then also remove the `file_exists()` function, as it's no longer uses. Then refactor `exec_in_container()` and `exec_in_container_with_exit_code()` to take a directory argument, and pass it to bollard's `CreateExecOptions()`, then pass the unpacked directory name in the appropriate places. That includes especially `make check` and `make installcheck`. Also modify them so they no longe run as the `postgres` user --- which can cause permission issues, as the source is unpacked and owned by root in the `Dockerfile`s --- and instead set the `PGUSER` environment variable. This ensure that all tests are run as the `root` system user but connect to the `postgres` database as the `postgres` user.
- Loading branch information
Showing
6 changed files
with
59 additions
and
64 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ temp.sh | |
**/.DS_Store | ||
poetry.lock | ||
site/ | ||
.vscode/ |
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
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
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