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

Commitb84a81d

Browse files
committed
[ci]: Updating fix to make_test_base
1 parent11bcb5e commitb84a81d

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

‎.ci/make_test_base

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,22 @@ put into postgresql conf.
77
88
On success, starts database
99
"""
10-
importos,sys,subprocess,glob,re,os.path,time
10+
importos,sys,subprocess,glob,re,os.path,time,re
1111

1212
iflen(sys.argv)!=2:
1313
print>>sys.stderr,"Usage %s data-directory"%sys.argv[0]
1414
sys.exit(1)
15+
16+
defprepare_extlist(value):
17+
v=re.sub("[']",'',value)
18+
l=re.split("\s*,\s*",v)
19+
if"pg_pathman"inl:
20+
# remove duplicates and reorder extension list to move pg_pathman to tail
21+
nl=sorted(list(set(l)),cmp=lambdaa,b:1ifa=="pg_pathman"else-1)
22+
new_value="'{}'".format(",".join(nl))
23+
returnnew_value
24+
else:
25+
returnvalue
1526

1627
datadir=sys.argv[1]
1728

@@ -27,7 +38,7 @@ if exitcode:
2738
sys.exit(exitcode)
2839
# Collect extra config option
2940
addopts={}
30-
formoduleinsorted(glob.glob("contrib/*"),cmp=lambdaa,b:1ifa=="pg_pathman"else-1):
41+
formoduleinglob.glob("contrib/*"):
3142
ifnotos.path.isdir(module):
3243
continue
3344
ifnotos.access(module+"/Makefile",os.R_OK):
@@ -59,7 +70,7 @@ for module in sorted(glob.glob("contrib/*"), cmp = lambda a,b: 1 if a=="pg_pathm
5970
ifaddopts:
6071
withopen(datadir+"/postgresql.conf","a")asf:
6172
foropt,valueinaddopts.items():
62-
print>>f,"%s=%s"%(opt,value)
73+
print>>f,"%s=%s"%(opt,prepare_extlist(value))
6374
withopen("initdb.log","a")asf:
6475
exitcode=subprocess.call(["pg_ctl","start","-D",datadir,"-l",datadir+"/postmaster.log"],env=env,stdout=f,stderr=subprocess.STDOUT)
6576
ifexitcode:
@@ -73,5 +84,3 @@ while time.time() < failtime:
7384
sys.exit(0)
7485
print>>sys.stderr,"Database havent't started in 60 seconds"
7586
sys.exit(1)
76-
77-

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp