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

Commit89dad03

Browse files
author
Michael Meskes
committed
also adjust MinGW expected file to new setup
create expected file with correct port number
1 parentb8f611c commit89dad03

File tree

4 files changed

+46
-29
lines changed

4 files changed

+46
-29
lines changed

‎src/interfaces/ecpg/test/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.62 2006/09/08 13:32:26 meskes Exp $
1+
# $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.63 2007/01/12 11:27:28 meskes Exp $
22

33
subdir = src/interfaces/ecpg/test
44
top_builddir = ../../../..
@@ -25,6 +25,7 @@ endif
2525

2626
allinstallinstalldirsuninstalldepdependdistprep:
2727
$(MAKE) -C connect$@
28+
$(MAKE) -C expected$@
2829
$(MAKE) -C sql$@
2930
$(MAKE) -C pgtypeslib$@
3031
$(MAKE) -C preproc$@
@@ -34,6 +35,7 @@ all install installdirs uninstall dep depend distprep:
3435
cleandistcleanmaintainer-clean:
3536
$(MAKE) -C connect$@
3637
$(MAKE) -C connect extraclean
38+
$(MAKE) -C expected extraclean
3739
$(MAKE) -C sql$@
3840
$(MAKE) -C pgtypeslib$@
3941
$(MAKE) -C preproc$@
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
subdir = src/interfaces/ecpg/test/expected
2+
top_builddir = ../../../../..
3+
include$(top_builddir)/src/Makefile.global
4+
include$(top_srcdir)/$(subdir)/../Makefile.regress
5+
6+
# port number for temp-installation test postmaster
7+
# this is also defined in ../Makefile
8+
TEMP_PORT = 5$(DEF_PGPORT)
9+
10+
connect-test1.c: connect-test1.c.in
11+
sed -e's,@TEMP_PORT@,$(TEMP_PORT),g'\
12+
$<>$@
13+
14+
all: connect-test1.c
15+
16+
extraclean:
17+
rm -f connect-test1.c
18+
Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
2-
THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT
3-
41
[NO_PID]: ECPGdebug: set to 1
52
[NO_PID]: sqlca: code: 0, state: 00000
63
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <DEFAULT>
@@ -19,45 +16,45 @@ THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT
1916
[NO_PID]: sqlca: code: 0, state: 00000
2017
[NO_PID]: ecpg_finish: Connection main closed.
2118
[NO_PID]: sqlca: code: 0, state: 00000
22-
[NO_PID]: ECPGconnect: opening database connectdb on localhost port55432
19+
[NO_PID]: ECPGconnect: opening database connectdb on localhost port<REGRESSION_PORT>
2320
[NO_PID]: sqlca: code: 0, state: 00000
2421
[NO_PID]: ecpg_finish: Connection main closed.
2522
[NO_PID]: sqlca: code: 0, state: 00000
26-
[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port55432 for user connectdb
23+
[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port<REGRESSION_PORT> for user connectdb
2724
[NO_PID]: sqlca: code: 0, state: 00000
2825
[NO_PID]: ecpg_finish: Connection main closed.
2926
[NO_PID]: sqlca: code: 0, state: 00000
30-
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port55432
27+
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port<REGRESSION_PORT>
3128
[NO_PID]: sqlca: code: 0, state: 00000
3229
[NO_PID]: ecpg_finish: Connection main closed.
3330
[NO_PID]: sqlca: code: 0, state: 00000
34-
[NO_PID]: ECPGconnect: opening database <DEFAULT> on <DEFAULT> port55432 for user connectdb
31+
[NO_PID]: ECPGconnect: opening database <DEFAULT> on <DEFAULT> port<REGRESSION_PORT> for user connectdb
3532
[NO_PID]: sqlca: code: 0, state: 00000
3633
[NO_PID]: ecpg_finish: Connection main closed.
3734
[NO_PID]: sqlca: code: 0, state: 00000
38-
[NO_PID]: ECPGconnect: opening database connectdb on localhost port55432 for user connectuser
35+
[NO_PID]: ECPGconnect: opening database connectdb on localhost port<REGRESSION_PORT> for user connectuser
3936
[NO_PID]: sqlca: code: 0, state: 00000
4037
[NO_PID]: ecpg_finish: Connection connectdb closed.
4138
[NO_PID]: sqlca: code: 0, state: 00000
42-
[NO_PID]: ECPGconnect: opening database on localhost port55432 for user connectdb
39+
[NO_PID]: ECPGconnect: opening database on localhost port<REGRESSION_PORT> for user connectdb
4340
[NO_PID]: sqlca: code: 0, state: 00000
4441
[NO_PID]: ecpg_finish: Connection closed.
4542
[NO_PID]: sqlca: code: 0, state: 00000
46-
[NO_PID]: ECPGconnect: opening database connectdb on localhost port55432 for user connectuser
43+
[NO_PID]: ECPGconnect: opening database connectdb on localhost port<REGRESSION_PORT> for user connectuser
4744
[NO_PID]: sqlca: code: 0, state: 00000
4845
[NO_PID]: ecpg_finish: Connection connectdb closed.
4946
[NO_PID]: sqlca: code: 0, state: 00000
50-
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port55432 for user connectuser
47+
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port<REGRESSION_PORT> for user connectuser
5148
[NO_PID]: sqlca: code: 0, state: 00000
5249
[NO_PID]: ecpg_finish: Connection connectdb closed.
5350
[NO_PID]: sqlca: code: 0, state: 00000
54-
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port55432 for user connectuser
51+
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port<REGRESSION_PORT> for user connectuser
5552
[NO_PID]: sqlca: code: 0, state: 00000
5653
[NO_PID]: ecpg_finish: Connection connectdb closed.
5754
[NO_PID]: sqlca: code: 0, state: 00000
58-
[NO_PID]: ECPGconnect: opening database nonexistant on localhost port55432 for user connectuser
55+
[NO_PID]: ECPGconnect: opening database nonexistant on localhost port<REGRESSION_PORT> for user connectuser
5956
[NO_PID]: sqlca: code: 0, state: 00000
60-
[NO_PID]: connect: could not open database nonexistant on localhost port55432 for user connectuser in line 62
57+
[NO_PID]: connect: could not open database nonexistant on localhost port<REGRESSION_PORT> for user connectuser in line 62
6158
FATAL: database "nonexistant" does not exist
6259

6360
[NO_PID]: sqlca: code: 0, state: 00000
@@ -67,9 +64,9 @@ THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT
6764
[NO_PID]: sqlca: code: -402, state: 08001
6865
[NO_PID]: raising sqlcode -220 in line 63, 'No such connection CURRENT in line 63.'.
6966
[NO_PID]: sqlca: code: -220, state: 08003
70-
[NO_PID]: ECPGconnect: opening database connectdb on localhost port20 for user connectuser
67+
[NO_PID]: ECPGconnect: opening database connectdb on localhost port<REGRESSION_PORT> for user connectuser
7168
[NO_PID]: sqlca: code: 0, state: 00000
72-
[NO_PID]: connect: could not open database connectdb on localhost port20 for user connectuser in line 66
69+
[NO_PID]: connect: could not open database connectdb on localhost port<REGRESSION_PORT> for user connectuser in line 66
7370
could not connect to server: Connection refused (0x0000274D/10061)
7471
Is the server running on host "localhost" and accepting
7572
TCP/IP connections on port 20?
@@ -79,5 +76,5 @@ THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT
7976
[NO_PID]: sqlca: code: 0, state: 00000
8077
[NO_PID]: raising sqlcode -402 in line 66, 'Could not connect to database connectdb in line 66.'.
8178
[NO_PID]: sqlca: code: -402, state: 08001
82-
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port55432 for user connectuser
79+
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port<REGRESSION_PORT> for user connectuser
8380
[NO_PID]: sqlca: code: 0, state: 00000

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,73 +61,73 @@ main(void)
6161
#line 30 "test1.pgc"
6262

6363

64-
{ECPGconnect(__LINE__,0,"connectdb@localhost:55432" ,NULL,NULL ,"main",0); }
64+
{ ECPGconnect(__LINE__, 0, "connectdb@localhost:@TEMP_PORT@" , NULL,NULL , "main", 0); }
6565
#line 32 "test1.pgc"
6666

6767
{ ECPGdisconnect(__LINE__, "main");}
6868
#line 33 "test1.pgc"
6969

7070

71-
{ECPGconnect(__LINE__,0,"@localhost:55432" ,"connectdb" ,NULL ,"main",0); }
71+
{ ECPGconnect(__LINE__, 0, "@localhost:@TEMP_PORT@" , "connectdb" , NULL , "main", 0); }
7272
#line 35 "test1.pgc"
7373

7474
{ ECPGdisconnect(__LINE__, "main");}
7575
#line 36 "test1.pgc"
7676

7777

78-
{ECPGconnect(__LINE__,0,"connectdb:55432" ,NULL,NULL ,"main",0); }
78+
{ ECPGconnect(__LINE__, 0, "connectdb:@TEMP_PORT@" , NULL,NULL , "main", 0); }
7979
#line 38 "test1.pgc"
8080

8181
{ ECPGdisconnect(__LINE__, "main");}
8282
#line 39 "test1.pgc"
8383

8484

85-
{ECPGconnect(__LINE__,0,":55432" ,"connectdb" ,NULL ,"main",0); }
85+
{ ECPGconnect(__LINE__, 0, ":@TEMP_PORT@" , "connectdb" , NULL , "main", 0); }
8686
#line 41 "test1.pgc"
8787

8888
{ ECPGdisconnect(__LINE__, "main");}
8989
#line 42 "test1.pgc"
9090

9191

92-
{ECPGconnect(__LINE__,0,"tcp:postgresql://localhost:55432/connectdb" ,"connectuser" ,"connectpw" ,NULL,0); }
92+
{ ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:@TEMP_PORT@/connectdb" , "connectuser" , "connectpw" , NULL, 0); }
9393
#line 44 "test1.pgc"
9494

9595
{ ECPGdisconnect(__LINE__, "CURRENT");}
9696
#line 45 "test1.pgc"
9797

9898

99-
{ECPGconnect(__LINE__,0,"tcp:postgresql://localhost:55432/" ,"connectdb" ,NULL ,NULL,0); }
99+
{ ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:@TEMP_PORT@/" , "connectdb" , NULL , NULL, 0); }
100100
#line 47 "test1.pgc"
101101

102102
{ ECPGdisconnect(__LINE__, "CURRENT");}
103103
#line 48 "test1.pgc"
104104

105105

106106
strcpy(pw, "connectpw");
107-
strcpy(db,"tcp:postgresql://localhost:55432/connectdb");
107+
strcpy(db, "tcp:postgresql://localhost:@TEMP_PORT@/connectdb");
108108
{ ECPGconnect(__LINE__, 0, db , "connectuser" , pw , NULL, 0); }
109109
#line 52 "test1.pgc"
110110

111111
{ ECPGdisconnect(__LINE__, "CURRENT");}
112112
#line 53 "test1.pgc"
113113

114114

115-
{ECPGconnect(__LINE__,0,"unix:postgresql://localhost:55432/connectdb" ,"connectuser" ,"connectpw" ,NULL,0); }
115+
{ ECPGconnect(__LINE__, 0, "unix:postgresql://localhost:@TEMP_PORT@/connectdb" , "connectuser" , "connectpw" , NULL, 0); }
116116
#line 55 "test1.pgc"
117117

118118
{ ECPGdisconnect(__LINE__, "CURRENT");}
119119
#line 56 "test1.pgc"
120120

121121

122-
{ECPGconnect(__LINE__,0,"unix:postgresql://localhost:55432/connectdb" ,"connectuser" ,NULL ,NULL,0); }
122+
{ ECPGconnect(__LINE__, 0, "unix:postgresql://localhost:@TEMP_PORT@/connectdb" , "connectuser" , NULL , NULL, 0); }
123123
#line 58 "test1.pgc"
124124

125125
{ ECPGdisconnect(__LINE__, "CURRENT");}
126126
#line 59 "test1.pgc"
127127

128128

129129
/* wrong db */
130-
{ECPGconnect(__LINE__,0,"tcp:postgresql://localhost:55432/nonexistant" ,"connectuser" ,"connectpw" ,NULL,0); }
130+
{ ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:@TEMP_PORT@/nonexistant" , "connectuser" , "connectpw" , NULL, 0); }
131131
#line 62 "test1.pgc"
132132

133133
{ ECPGdisconnect(__LINE__, "CURRENT");}
@@ -141,7 +141,7 @@ main(void)
141141
/* no disconnect necessary */
142142

143143
/* wrong password */
144-
{ECPGconnect(__LINE__,0,"unix:postgresql://localhost:55432/connectdb" ,"connectuser" ,"wrongpw" ,NULL,0); }
144+
{ ECPGconnect(__LINE__, 0, "unix:postgresql://localhost:@TEMP_PORT@/connectdb" , "connectuser" , "wrongpw" , NULL, 0); }
145145
#line 70 "test1.pgc"
146146

147147
/* no disconnect necessary */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp