Skip to content

Commit dc31920

Browse files
committed
Move regression tests from ./bin/ to ./regress/
1 parent 20dea46 commit dc31920

16 files changed

+45
-30
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Global excludes across all subdirectories
22
*.o
33
*.so
4-
bin/regression.diffs
5-
bin/regression.out
4+
regress/regression.diffs
5+
regress/regression.out

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ $(error pg_repack requires PostgreSQL 8.3 or later. This is $(VERSION))
2323
endif
2424

2525

26-
SUBDIRS = bin lib
26+
SUBDIRS = bin lib regress
2727

2828
all install installdirs uninstall distprep clean distclean maintainer-clean debug:
2929
@for dir in $(SUBDIRS); do \

bin/Makefile

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,11 @@
88

99
PG_CONFIG ?= pg_config
1010

11-
# version as a number, e.g. 9.1.4 -> 901
12-
VERSION := $(shell $(PG_CONFIG) --version | awk '{print $$2}')
13-
INTVERSION := $(shell echo $$(($$(echo $(VERSION) | sed -E 's/([0-9]+)\.([0-9]+).*/\1*100+\2/'))))
14-
1511
SRCS = pg_repack.c pgut/pgut.c pgut/pgut-fe.c
1612
OBJS = $(SRCS:.c=.o)
1713
PROGRAM = pg_repack
1814

1915

20-
#
21-
# Test suite
22-
#
23-
24-
ifeq ($(shell echo $$(($(INTVERSION) >= 901))),1)
25-
REGRESS := init-extension
26-
else
27-
REGRESS := init-legacy
28-
endif
29-
30-
# plpgsql not available by default on pg < 9.0
31-
ifeq ($(shell echo $$(($(INTVERSION) < 900))),1)
32-
REGRESS += plpgsql
33-
endif
34-
35-
REGRESS += repack tablespace
36-
37-
# This test depends on collate, not supported before 9.1
38-
ifeq ($(shell echo $$(($(INTVERSION) >= 901))),1)
39-
REGRESS += issue3
40-
endif
41-
42-
4316
# The version number of the program. It should be the same of the library.
4417
REPACK_VERSION = $(shell grep '"version":' ../META.json | head -1 \
4518
| sed -e 's/[ ]*"version":[ ]*"\(.*\)",/\1/')

regress/Makefile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#
2+
# pg_repack: regress/Makefile
3+
#
4+
# Portions Copyright (c) 2008-2012, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
5+
# Portions Copyright (c) 2011, Itagaki Takahiro
6+
# Portions Copyright (c) 2012, The Reorg Development Team
7+
#
8+
9+
PG_CONFIG ?= pg_config
10+
11+
# version as a number, e.g. 9.1.4 -> 901
12+
VERSION := $(shell $(PG_CONFIG) --version | awk '{print $$2}')
13+
INTVERSION := $(shell echo $$(($$(echo $(VERSION) | sed -E 's/([0-9]+)\.([0-9]+).*/\1*100+\2/'))))
14+
15+
16+
#
17+
# Test suite
18+
#
19+
20+
ifeq ($(shell echo $$(($(INTVERSION) >= 901))),1)
21+
REGRESS := init-extension
22+
else
23+
REGRESS := init-legacy
24+
endif
25+
26+
# plpgsql not available by default on pg < 9.0
27+
ifeq ($(shell echo $$(($(INTVERSION) < 900))),1)
28+
REGRESS += plpgsql
29+
endif
30+
31+
REGRESS += repack tablespace
32+
33+
# This test depends on collate, not supported before 9.1
34+
ifeq ($(shell echo $$(($(INTVERSION) >= 901))),1)
35+
REGRESS += issue3
36+
endif
37+
38+
39+
USE_PGXS = 1 # use pgxs if not in contrib directory
40+
PG_CONFIG = pg_config
41+
PGXS := $(shell $(PG_CONFIG) --pgxs)
42+
include $(PGXS)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)