Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitac03efb

Browse files
author
Michael Meskes
committed
Removed port testing.
1 parent6355e69 commitac03efb

File tree

6 files changed

+43
-130
lines changed

6 files changed

+43
-130
lines changed

‎src/interfaces/ecpg/test/Makefile

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
# $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.74 2008/11/28 23:47:51 tgl Exp $
1+
# $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.75 2008/12/01 11:37:37 meskes Exp $
22

33
subdir = src/interfaces/ecpg/test
44
top_builddir = ../../../..
55
include$(top_builddir)/src/Makefile.global
66

7-
# port number for temp-installation test postmaster
8-
# this is also defined in test/connect/Makefile
9-
TEMP_PORT = 4$(DEF_PGPORT)
10-
117
# where to find psql for testing an existing installation
128
PSQLDIR =$(bindir)
139

@@ -37,7 +33,6 @@ REGRESSDRIVER = "$(top_builddir)/src/test/regress/pg_regress.o"
3733

3834
allinstallinstalldirsuninstalldistprep:
3935
$(MAKE) -C connect$@
40-
$(MAKE) -C expected$@
4136
$(MAKE) -C sql$@
4237
$(MAKE) -C pgtypeslib$@
4338
$(MAKE) -C preproc$@
@@ -46,8 +41,6 @@ all install installdirs uninstall distprep:
4641

4742
cleandistcleanmaintainer-clean:
4843
$(MAKE) -C connect$@
49-
$(MAKE) -C connect extraclean
50-
$(MAKE) -C expected extraclean
5144
$(MAKE) -C sql$@
5245
$(MAKE) -C pgtypeslib$@
5346
$(MAKE) -C preproc$@
@@ -88,11 +81,11 @@ endif
8881

8982

9083
check: all
91-
./pg_regress --dbname=regress1,connectdb --top-builddir=$(top_builddir) --temp-install=./tmp_check --port=$(TEMP_PORT) --multibyte=$(MULTIBYTE) --load-language=plpgsql$(NOLOCALE)$(THREAD) --schedule=$(srcdir)/ecpg_schedule --create-role=connectuser,connectdb
84+
./pg_regress --dbname=regress1,connectdb --top-builddir=$(top_builddir) --temp-install=./tmp_check --multibyte=$(MULTIBYTE) --load-language=plpgsql$(NOLOCALE)$(THREAD) --schedule=$(srcdir)/ecpg_schedule --create-role=connectuser,connectdb
9285

9386
# the same options, but with --listen-on-tcp
9487
checktcp: all
95-
./pg_regress --dbname=regress1,connectdb --top-builddir=$(top_builddir) --temp-install=./tmp_check --port=$(TEMP_PORT) --multibyte=$(MULTIBYTE) --load-language=plpgsql$(NOLOCALE)$(THREAD) --schedule=$(srcdir)/ecpg_schedule_tcp --create-role=connectuser,connectdb --host=localhost
88+
./pg_regress --dbname=regress1,connectdb --top-builddir=$(top_builddir) --temp-install=./tmp_check --multibyte=$(MULTIBYTE) --load-language=plpgsql$(NOLOCALE)$(THREAD) --schedule=$(srcdir)/ecpg_schedule_tcp --create-role=connectuser,connectdb --host=localhost
9689

9790
installcheck: all
9891
./pg_regress --psqldir=$(PSQLDIR) --dbname=regress1,connectdb --top-builddir=$(top_builddir) --multibyte=$(MULTIBYTE) --load-language=plpgsql$(NOLOCALE)$(THREAD) --schedule=$(srcdir)/ecpg_schedule --create-role=connectuser,connectdb

‎src/interfaces/ecpg/test/connect/Makefile

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,6 @@ top_builddir = ../../../../..
33
include$(top_builddir)/src/Makefile.global
44
include$(top_srcdir)/$(subdir)/../Makefile.regress
55

6-
# port number for temp-installation test postmaster
7-
# this is also defined in ../Makefile
8-
TEMP_PORT = 4$(DEF_PGPORT)
9-
10-
test1.pgc: test1.pgc.in
11-
sed -e's,@TEMP_PORT@,$(TEMP_PORT),g'\
12-
$<>$@
13-
sed -e's,@TEMP_PORT@,$(TEMP_PORT),g'\
14-
$(top_srcdir)/$(subdir)/../expected/connect-test1.c.in>../expected/connect-test1.c
15-
166
TESTS = test1 test1.c\
177
test2 test2.c\
188
test3 test3.c\
@@ -21,5 +11,3 @@ TESTS = test1 test1.c \
2111

2212
all:$(TESTS)
2313

24-
extraclean:
25-
rm -f test1.pgc

‎src/interfaces/ecpg/test/connect/test1.pgc.inrenamed to‎src/interfaces/ecpg/test/connect/test1.pgc

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,45 +29,36 @@ exec sql end declare section;
2929
exec sql connect to @localhost as main user connectdb;
3030
exec sql disconnect main;
3131

32-
exec sql connect to connectdb@localhost:@TEMP_PORT@ as main;
33-
exec sql disconnect main;
34-
35-
exec sql connect to @localhost:@TEMP_PORT@ as main user connectdb;
36-
exec sql disconnect main;
37-
38-
exec sql connect to connectdb:@TEMP_PORT@ as main;
39-
exec sql disconnect main;
40-
41-
exec sql connect to :@TEMP_PORT@ as main user connectdb;
42-
exec sql disconnect main;
32+
/* exec sql connect to :@TEMP_PORT@ as main user connectdb;
33+
exec sql disconnect main; */
4334

44-
exec sql connect to tcp:postgresql://localhost:@TEMP_PORT@/connectdb user connectuser identified by connectpw;
35+
exec sql connect to tcp:postgresql://localhost/connectdb user connectuser identified by connectpw;
4536
exec sql disconnect;
4637

47-
exec sql connect to tcp:postgresql://localhost:@TEMP_PORT@/ user connectdb;
38+
exec sql connect to tcp:postgresql://localhost/ user connectdb;
4839
exec sql disconnect;
4940

5041
strcpy(pw, "connectpw");
51-
strcpy(db, "tcp:postgresql://localhost:@TEMP_PORT@/connectdb");
42+
strcpy(db, "tcp:postgresql://localhost/connectdb");
5243
exec sql connect to :db user connectuser using :pw;
5344
exec sql disconnect;
5445

55-
exec sql connect to unix:postgresql://localhost:@TEMP_PORT@/connectdb user connectuser using "connectpw";
46+
exec sql connect to unix:postgresql://localhost/connectdb user connectuser using "connectpw";
5647
exec sql disconnect;
5748

58-
exec sql connect to unix:postgresql://localhost:@TEMP_PORT@/connectdb?connect_timeout=14 user connectuser;
49+
exec sql connect to unix:postgresql://localhost/connectdb?connect_timeout=14 user connectuser;
5950
exec sql disconnect;
6051

6152
/* wrong db */
62-
exec sql connect to tcp:postgresql://localhost:@TEMP_PORT@/nonexistant user connectuser identified by connectpw;
53+
exec sql connect to tcp:postgresql://localhost/nonexistant user connectuser identified by connectpw;
6354
exec sql disconnect;
6455

6556
/* wrong port */
6657
exec sql connect to tcp:postgresql://localhost:20/connectdb user connectuser identified by connectpw;
6758
/* no disconnect necessary */
6859

6960
/* wrong password */
70-
exec sql connect to unix:postgresql://localhost:@TEMP_PORT@/connectdb user connectuser identified by "wrongpw";
61+
exec sql connect to unix:postgresql://localhost/connectdb user connectuser identified by "wrongpw";
7162
/* no disconnect necessary */
7263

7364
return (0);

‎src/interfaces/ecpg/test/expected/Makefile

Lines changed: 0 additions & 18 deletions
This file was deleted.

‎src/interfaces/ecpg/test/expected/connect-test1.c.inrenamed to‎src/interfaces/ecpg/test/expected/connect-test1.c

Lines changed: 21 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -60,88 +60,63 @@ main(void)
6060
#line 30 "test1.pgc"
6161

6262

63-
{ ECPGconnect(__LINE__, 0, "connectdb@localhost:@TEMP_PORT@" , NULL, NULL , "main", 0); }
64-
#line 32 "test1.pgc"
63+
/* exec sql connect to:@TEMP_PORT@ asmain user connectdb;
64+
exec sql disconnect main; */
6565

66-
{ ECPGdisconnect(__LINE__, "main");}
67-
#line 33 "test1.pgc"
68-
69-
70-
{ ECPGconnect(__LINE__, 0, "@localhost:@TEMP_PORT@" , "connectdb" , NULL , "main", 0); }
66+
{ECPGconnect(__LINE__,0,"tcp:postgresql://localhost/connectdb" ,"connectuser" ,"connectpw" ,NULL,0); }
7167
#line 35 "test1.pgc"
7268

73-
{ ECPGdisconnect(__LINE__, "main");}
69+
{ECPGdisconnect(__LINE__,"CURRENT");}
7470
#line 36 "test1.pgc"
7571

7672

77-
{ ECPGconnect(__LINE__, 0, "connectdb:@TEMP_PORT@" ,NULL, NULL ,"main", 0); }
73+
{ECPGconnect(__LINE__,0,"tcp:postgresql://localhost/" ,"connectdb",NULL ,NULL,0); }
7874
#line 38 "test1.pgc"
7975

80-
{ ECPGdisconnect(__LINE__, "main");}
81-
#line 39 "test1.pgc"
82-
83-
84-
{ ECPGconnect(__LINE__, 0, ":@TEMP_PORT@" , "connectdb" , NULL , "main", 0); }
85-
#line 41 "test1.pgc"
86-
87-
{ ECPGdisconnect(__LINE__, "main");}
88-
#line 42 "test1.pgc"
89-
90-
91-
{ ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:@TEMP_PORT@/connectdb" , "connectuser" , "connectpw" , NULL, 0); }
92-
#line 44 "test1.pgc"
93-
94-
{ ECPGdisconnect(__LINE__, "CURRENT");}
95-
#line 45 "test1.pgc"
96-
97-
98-
{ ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:@TEMP_PORT@/" , "connectdb" , NULL , NULL, 0); }
99-
#line 47 "test1.pgc"
100-
10176
{ECPGdisconnect(__LINE__,"CURRENT");}
102-
#line48 "test1.pgc"
77+
#line39 "test1.pgc"
10378

10479

10580
strcpy(pw,"connectpw");
106-
strcpy(db, "tcp:postgresql://localhost:@TEMP_PORT@/connectdb");
81+
strcpy(db,"tcp:postgresql://localhost/connectdb");
10782
{ECPGconnect(__LINE__,0,db ,"connectuser" ,pw ,NULL,0); }
108-
#line52 "test1.pgc"
83+
#line43 "test1.pgc"
10984

11085
{ECPGdisconnect(__LINE__,"CURRENT");}
111-
#line53 "test1.pgc"
86+
#line44 "test1.pgc"
11287

11388

114-
{ ECPGconnect(__LINE__, 0, "unix:postgresql://localhost:@TEMP_PORT@/connectdb" , "connectuser" , "connectpw" , NULL, 0); }
115-
#line55 "test1.pgc"
89+
{ECPGconnect(__LINE__,0,"unix:postgresql://localhost/connectdb" ,"connectuser" ,"connectpw" ,NULL,0); }
90+
#line46 "test1.pgc"
11691

11792
{ECPGdisconnect(__LINE__,"CURRENT");}
118-
#line56 "test1.pgc"
93+
#line47 "test1.pgc"
11994

12095

121-
{ ECPGconnect(__LINE__, 0, "unix:postgresql://localhost:@TEMP_PORT@/connectdb?connect_timeout=14" , "connectuser" , NULL , NULL, 0); }
122-
#line58 "test1.pgc"
96+
{ECPGconnect(__LINE__,0,"unix:postgresql://localhost/connectdb?connect_timeout=14" ,"connectuser" ,NULL ,NULL,0); }
97+
#line49 "test1.pgc"
12398

12499
{ECPGdisconnect(__LINE__,"CURRENT");}
125-
#line59 "test1.pgc"
100+
#line50 "test1.pgc"
126101

127102

128103
/* wrong db */
129-
{ ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:@TEMP_PORT@/nonexistant" , "connectuser" , "connectpw" , NULL, 0); }
130-
#line62 "test1.pgc"
104+
{ECPGconnect(__LINE__,0,"tcp:postgresql://localhost/nonexistant" ,"connectuser" ,"connectpw" ,NULL,0); }
105+
#line53 "test1.pgc"
131106

132107
{ECPGdisconnect(__LINE__,"CURRENT");}
133-
#line63 "test1.pgc"
108+
#line54 "test1.pgc"
134109

135110

136111
/* wrong port */
137112
{ECPGconnect(__LINE__,0,"tcp:postgresql://localhost:20/connectdb" ,"connectuser" ,"connectpw" ,NULL,0); }
138-
#line66 "test1.pgc"
113+
#line57 "test1.pgc"
139114

140115
/* no disconnect necessary */
141116

142117
/* wrong password */
143-
{ ECPGconnect(__LINE__, 0, "unix:postgresql://localhost:@TEMP_PORT@/connectdb" , "connectuser" , "wrongpw" , NULL, 0); }
144-
#line70 "test1.pgc"
118+
{ECPGconnect(__LINE__,0,"unix:postgresql://localhost/connectdb" ,"connectuser" ,"wrongpw" ,NULL,0); }
119+
#line61 "test1.pgc"
145120

146121
/* no disconnect necessary */
147122

‎src/interfaces/ecpg/test/expected/connect-test1.stderr

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,52 +18,36 @@
1818
[NO_PID]: sqlca: code: 0, state: 00000
1919
[NO_PID]: ecpg_finish: connection main closed
2020
[NO_PID]: sqlca: code: 0, state: 00000
21-
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT>
22-
[NO_PID]: sqlca: code: 0, state: 00000
23-
[NO_PID]: ecpg_finish: connection main closed
24-
[NO_PID]: sqlca: code: 0, state: 00000
25-
[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port <REGRESSION_PORT> for user connectdb
26-
[NO_PID]: sqlca: code: 0, state: 00000
27-
[NO_PID]: ecpg_finish: connection main closed
28-
[NO_PID]: sqlca: code: 0, state: 00000
29-
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <REGRESSION_PORT>
30-
[NO_PID]: sqlca: code: 0, state: 00000
31-
[NO_PID]: ecpg_finish: connection main closed
32-
[NO_PID]: sqlca: code: 0, state: 00000
33-
[NO_PID]: ECPGconnect: opening database <DEFAULT> on <DEFAULT> port <REGRESSION_PORT> for user connectdb
34-
[NO_PID]: sqlca: code: 0, state: 00000
35-
[NO_PID]: ecpg_finish: connection main closed
36-
[NO_PID]: sqlca: code: 0, state: 00000
37-
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT> for user connectuser
21+
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <DEFAULT> for user connectuser
3822
[NO_PID]: sqlca: code: 0, state: 00000
3923
[NO_PID]: ecpg_finish: connection connectdb closed
4024
[NO_PID]: sqlca: code: 0, state: 00000
41-
[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port <REGRESSION_PORT> for user connectdb
25+
[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port <DEFAULT> for user connectdb
4226
[NO_PID]: sqlca: code: 0, state: 00000
4327
[NO_PID]: ecpg_finish: connection (null) closed
4428
[NO_PID]: sqlca: code: 0, state: 00000
45-
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT> for user connectuser
29+
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <DEFAULT> for user connectuser
4630
[NO_PID]: sqlca: code: 0, state: 00000
4731
[NO_PID]: ecpg_finish: connection connectdb closed
4832
[NO_PID]: sqlca: code: 0, state: 00000
49-
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <REGRESSION_PORT> for user connectuser
33+
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <DEFAULT> for user connectuser
5034
[NO_PID]: sqlca: code: 0, state: 00000
5135
[NO_PID]: ecpg_finish: connection connectdb closed
5236
[NO_PID]: sqlca: code: 0, state: 00000
53-
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <REGRESSION_PORT> with options connect_timeout=14 for user connectuser
37+
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <DEFAULT> with options connect_timeout=14 for user connectuser
5438
[NO_PID]: sqlca: code: 0, state: 00000
5539
[NO_PID]: ecpg_finish: connection connectdb closed
5640
[NO_PID]: sqlca: code: 0, state: 00000
57-
[NO_PID]: ECPGconnect: opening database nonexistant on localhost port <REGRESSION_PORT> for user connectuser
41+
[NO_PID]: ECPGconnect: opening database nonexistant on localhost port <DEFAULT> for user connectuser
5842
[NO_PID]: sqlca: code: 0, state: 00000
5943
[NO_PID]: ECPGconnect: could not open database: FATAL: database "nonexistant" does not exist
6044

6145
[NO_PID]: sqlca: code: 0, state: 00000
6246
[NO_PID]: ecpg_finish: connection nonexistant closed
6347
[NO_PID]: sqlca: code: 0, state: 00000
64-
[NO_PID]: raising sqlcode -402 on line62: could not connect to database "nonexistant" on line62
48+
[NO_PID]: raising sqlcode -402 on line53: could not connect to database "nonexistant" on line53
6549
[NO_PID]: sqlca: code: -402, state: 08001
66-
[NO_PID]: raising sqlcode -220 on line63: no such connection CURRENT on line63
50+
[NO_PID]: raising sqlcode -220 on line54: no such connection CURRENT on line54
6751
[NO_PID]: sqlca: code: -220, state: 08003
6852
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT> for user connectuser
6953
[NO_PID]: sqlca: code: 0, state: 00000
@@ -74,7 +58,7 @@
7458
[NO_PID]: sqlca: code: 0, state: 00000
7559
[NO_PID]: ecpg_finish: connection connectdb closed
7660
[NO_PID]: sqlca: code: 0, state: 00000
77-
[NO_PID]: raising sqlcode -402 on line66: could not connect to database "connectdb" on line66
61+
[NO_PID]: raising sqlcode -402 on line57: could not connect to database "connectdb" on line57
7862
[NO_PID]: sqlca: code: -402, state: 08001
79-
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <REGRESSION_PORT> for user connectuser
63+
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <DEFAULT> for user connectuser
8064
[NO_PID]: sqlca: code: 0, state: 00000

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp