Skip to content

Commit

Permalink
Rename all to Python
Browse files Browse the repository at this point in the history
  • Loading branch information
postgres-dev committed Aug 8, 2023
1 parent f133967 commit d416d25
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ jobs:
pg_version: [15]
# pg_version: [11, 12, 13, 14, 15]
os: [ubuntu-22.04]
tests: [tap, all]
tests: [tap, python]
test_mode: [normal, legacy, paranoia]
exclude:
- tests: tap
test_mode: paranoia
- tests: all
- tests: python
test_mode: normal
- tests: all
- tests: python
test_mode: legacy
fail-fast: false
name: ${{ format('Ptrack ({0}, PostgreSQL {1}, {2} tests, {3} mode)', matrix.os, matrix.pg_version, matrix.tests, matrix.test_mode) }}
Expand All @@ -49,6 +49,11 @@ jobs:
uses: actions/checkout@v3
with:
path: ptrack
- name: Get Pg_probackup sources
uses: actions/checkout@v3
with:
repository: postgrespro/pg_probackup
path: pg_probackup
- name: Apply ptrack patches
run: make patch
working-directory: ptrack
Expand All @@ -66,12 +71,15 @@ jobs:
- name: Install Ptrack
run: make install USE_PGXS=1
working-directory: ptrack
- name: Install Pg_probackup
run: make install-pg-probackup
working-directory: ptrack
# 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
run: make test-${{ matrix.tests }}
working-directory: ptrack
shell: runuser dev {0}
runs-on: ubuntu-latest
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ PG_CONFIG ?= pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
top_builddir ?= ../postgres
top_builddir ?= $(CURDIR)/../postgres
# Makefile.global is a build artifact and initially may not be available
ifneq ($(wildcard $(top_builddir)/src/Makefile.global), )
include $(top_builddir)/src/Makefile.global
Expand Down Expand Up @@ -52,14 +52,18 @@ install-postgres:
# Now when Postgres is built we can use PGXS for all remainig targets
USE_PGXS = 1

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

pg_probackup_dir ?= $(CURDIR)/../pg_probackup
install-pg-probackup:
$(MAKE) -j $(nproc) -C $(pg_probackup_dir) install

test-python:
env=PG_PROBACKUP_PTRACK=ON; \
if [ "$(TEST_MODE)" = basic ]; then \
env="$$env PG_PROBACKUP_TEST_BASIC=ON"; \
Expand All @@ -72,4 +76,3 @@ else
tests=tests.ptrack.PtrackTest."$(TEST_CASE)"; \
fi; \
env $$env python3 -m unittest -v "$$tests"
endif

0 comments on commit d416d25

Please sign in to comment.