Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 16ed394

Browse files
committed
Wrap regression test as tap
1 parent 6739ffe commit 16ed394

File tree

4 files changed

+22
-33
lines changed

4 files changed

+22
-33
lines changed

Makefile

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ EXTRA_INSTALL=contrib/mmts
2929

3030
all: multimaster.so
3131

32-
check: | temp-install regress
32+
submake-regress:
33+
$(MAKE) -C $(top_builddir)/src/test/regress all
34+
$(MAKE) -C $(top_builddir)/src/test/regress tablespace-setup
35+
36+
check: temp-install submake-regress
3337
$(prove_check)
3438

3539
start: temp-install
@@ -43,37 +47,12 @@ start: temp-install
4347
stop:
4448
cd $(srcdir) && TESTDIR='$(CURDIR)' \
4549
$(with_temp_install) \
46-
PGPORT='6$(DEF_PGPORT)' \
47-
PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress' \
4850
perl run.pl --stop
4951

50-
submake-regress:
51-
$(MAKE) -C $(top_builddir)/src/test/regress all
52-
$(MAKE) -C $(top_builddir)/src/test/regress tablespace-setup
53-
54-
run-regress: submake-regress
55-
$(with_temp_install) \
56-
PGPORT='6$(DEF_PGPORT)' \
57-
PGHOST='127.0.0.1' \
58-
$(top_builddir)/src/test/regress/pg_regress \
59-
--use-existing \
60-
--bindir= \
61-
$(pg_regress_locale_flags) multimaster || export ERROR=1; \
62-
\
63-
cd $(srcdir) && TESTDIR='$(CURDIR)' \
64-
$(with_temp_install) \
65-
PGPORT='6$(DEF_PGPORT)' \
66-
PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress' \
67-
perl run.pl --stop; \
68-
\
69-
[ -z $${ERROR} ]
70-
71-
regress: | start run-regress
72-
7352
run-pg-regress: submake-regress
7453
cd $(CURDIR)/$(top_builddir)/src/test/regress && \
7554
$(with_temp_install) \
76-
PGPORT='6$(DEF_PGPORT)' \
55+
PGPORT='65432' \
7756
PGHOST='127.0.0.1' \
7857
PGUSER='$(USER)' \
7958
./pg_regress \

run.pl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
if ($action eq "--start")
1111
{
1212
$PostgresNode::last_port_assigned = 65431;
13-
$PostgresNode::test_pghost = "127.0.0.1";
1413

1514
my $cluster = new Cluster($n_nodes);
1615
$cluster->init();
@@ -33,6 +32,3 @@
3332
{
3433
die("Usage: run.pl --start/--stop\n");
3534
}
36-
37-
38-

t/000_regress.pl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
use Cluster;
2+
# use TestLib;
3+
use Test::More tests => 1;
4+
5+
my $cluster = new Cluster(3);
6+
$cluster->init();
7+
$cluster->start();
8+
$cluster->create_mm('regression');
9+
10+
my $port = $cluster->{nodes}->[0]->port;
11+
12+
TestLib::system_or_bail($ENV{'PG_REGRESS'},
13+
'--host=127.0.0.1', "--port=$port",
14+
'--use-existing', '--bindir=', 'multimaster');
15+
16+
is(1,1, "ok");

t/005_add_stop_node.pl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
use TestLib;
66
use Test::More tests => 6;
77

8-
$PostgresNode::last_port_assigned = 65431;
9-
108
my $cluster = new Cluster(3);
119
$cluster->init();
1210
$cluster->start();

0 commit comments

Comments
 (0)