From 7851b302c6c203b9af9d2f4b5a9ba710716048c7 Mon Sep 17 00:00:00 2001 From: asavchkov Date: Wed, 23 Aug 2023 09:03:12 +0700 Subject: [PATCH] Use the default pg_config location --- Makefile | 3 ++- README.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9f3d62f..374dec8 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,6 @@ TAP_TESTS = 1 PG_LIBS_INTERNAL += $(libpq_pgport) ifdef USE_PGXS -PG_CONFIG ?= pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) else @@ -71,6 +70,8 @@ install-pg-probackup: $(MAKE) -C $(pg_probackup_dir) install USE_PGXS=$(USE_PGXS) PG_CONFIG=$(PG_CONFIG) top_srcdir=$(top_srcdir) PYTEST_PROCESSES ?= $(shell nproc) +# Python tests read pg_config only from PG_CONFIG +test-python: PG_CONFIG ?= pg_config test-python: cd $(pg_probackup_dir); \ env="PG_PROBACKUP_PTRACK=ON PG_CONFIG=$(PG_CONFIG)"; \ diff --git a/README.md b/README.md index b4854d3..420a5da 100644 --- a/README.md +++ b/README.md @@ -220,6 +220,7 @@ You can control how tests are executed by using the following environment (or `m | Variable | Possible values | Required | Default value | Description | | - | - | - | - | - | +| PG_CONFIG | File path | No | pg_config for `test-python`, not set for other targets | The path to the `pg_config` binary. Can be set to specify a custom location of `pg_config`. | | TESTS | A Pytest filter expression | No | Not set (run all Python tests) | A filter to include only selected tests into the run. See the Pytest `-k` option for more information. This variable is only applicable to `test-python` for the tests located in [tests](https://github.com/postgrespro/pg_probackup/tree/master/tests). | | TEST_MODE | normal, legacy, paranoia | No | normal | The "legacy" mode runs tests in an environment similar to a 32-bit Windows system. This mode is only applicable to `test-tap`. The "paranoia" mode compares the checksums of each block of the database catalog (PGDATA) contents before making a backuo and after the restoration. This mode is only applicable to `test-python`.|