Skip to content

Commit

Permalink
Try clean
Browse files Browse the repository at this point in the history
  • Loading branch information
postgres-dev committed Aug 10, 2023
1 parent 14eca0f commit 090bf62
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
# pg_version: [11, 12, 13, 14, 15]
os: [ubuntu-22.04]
tests: [tap, python]
test_mode: [normal, legacy, paranoia]
# test_mode: [normal, legacy, paranoia]
test_mode: [normal, paranoia]
exclude:
- tests: tap
test_mode: paranoia
Expand Down Expand Up @@ -60,6 +61,8 @@ jobs:
working-directory: ptrack
- name: Install Postgres
run: |
rm -rf /home/dev/pgsql
git clean -ffdx
if [ "$TESTS" = tap -a "$MODE" = legacy ]; then
./configure CFLAGS='-DEXEC_BACKEND' --disable-atomics --prefix=$PREFIX --enable-debug --enable-cassert --enable-depend --enable-tap-tests --quiet
else
Expand All @@ -70,17 +73,17 @@ jobs:
echo $PREFIX/bin >> $GITHUB_PATH
working-directory: postgres
- name: Install Ptrack
run: make install USE_PGXS=1
run: git clean -ffdx; make install USE_PGXS=1
working-directory: ptrack
- name: Install Pg_probackup
run: make install-pg-probackup USE_PGXS=1 PG_CONFIG=$PREFIX/bin/pg_config top_srcdir=../postgres
working-directory: ptrack
run: make install USE_PGXS=1 PG_CONFIG=$PREFIX/bin/pg_config top_srcdir=../postgres
working-directory: pg_probackup
# The sources are checked out by the root but ptrack tests need to write
# to the source tree
- name: Change the permissions of the ptrack folder
run: chown "dev:" ptrack
- name: Test
run: make test-${{ matrix.tests }}
run: make test-${{ matrix.tests }} USE_PGXS=1 PG_CONFIG=$PREFIX/bin/pg_config
working-directory: ptrack
shell: runuser dev {0}
runs-on: ubuntu-latest
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,19 @@ install-postgres:

test-tap:
ifeq ($(TEST_MODE), legacy)
setarch x86_64 --addr-no-randomize $(MAKE) installcheck
setarch x86_64 --addr-no-randomize $(MAKE) installcheck USE_PGXS=$(USE_PGXS) PG_CONFIG=$(PG_CONFIG)
else
$(MAKE) installcheck
$(MAKE) installcheck USE_PGXS=$(USE_PGXS) PG_CONFIG=$(PG_CONFIG)
endif

pg_probackup_dir ?= $(CURDIR)/../pg_probackup
# Pg_probackup's Makefile uses top_srcdir when building via PGXS so set it when calling this target
install-pg-probackup:
echo PATH=$$PATH
export PATH=/home/dev/pgsql/bin:$$PATH; echo PATHnew=$$PATH; $(MAKE) -j $(nproc) -C $(pg_probackup_dir) install USE_PGXS=$(USE_PGXS) PG_CONFIG=$(PG_CONFIG) top_srcdir=$(top_srcdir)
export PATH=/home/dev/pgsql/bin:$$PATH; echo PATHnew=$$PATH; $(MAKE) -j $(nproc) -C $(pg_probackup_dir) install USE_PGXS=$(USE_PGXS) PG_CONFIG=$(PG_CONFIG) top_srcdir=$(CURDIR)/../postgres

test-python:
cd $(pg_probackup_dir); \
env=PG_PROBACKUP_PTRACK=ON; \
if [ "$(TEST_MODE)" = basic ]; then \
env="$$env PG_PROBACKUP_TEST_BASIC=ON"; \
Expand Down

0 comments on commit 090bf62

Please sign in to comment.