Changeset: 1413f5346290 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1413f5346290
Modified Files:
buildtools/autogen/autogen/am.py
buildtools/autogen/autogen/msc.py
testing/Mtest.py.in
Branch: Jul2012
Log Message:
Merged with parallel Jul2012 branch head
diffs (86 lines):
diff --git a/buildtools/autogen/autogen/am.py b/buildtools/autogen/autogen/am.py
--- a/buildtools/autogen/autogen/am.py
+++ b/buildtools/autogen/autogen/am.py
@@ -1037,7 +1037,7 @@ def am_ant(fd, var, ant, am):
if ant.has_key("COND"):
fd.write("\nif " + ant["COND"][0] +"\n\n")
- fd.write("\n%s_ant_target:\n\t\"$(ANT)\" -f \"`$(anttranslatepath)
$(srcdir)/build.xml`\" -Dbuilddir=\"`$(anttranslatepath) $(PWD)`\"
-Djardir=\"`$(anttranslatepath) $(PWD)`\" -Dbasedir=\"`$(anttranslatepath)
$(srcdir)`\" %s\n" % (target, target))
+ fd.write("\n%s_ant_target:\n\t\"$(ANT)\" -f \"`$(anttranslatepath)
$(srcdir)/build.xml`\" -Dbuilddir=\"`$(anttranslatepath) $(PWD)/%s`\"
-Djardir=\"`$(anttranslatepath) $(PWD)`\" -Dbasedir=\"`$(anttranslatepath)
$(srcdir)`\" %s\n" % (target, target, target))
for file in ant['FILES']:
sfile = file.replace(".", "_")
diff --git a/buildtools/autogen/autogen/msc.py
b/buildtools/autogen/autogen/msc.py
--- a/buildtools/autogen/autogen/msc.py
+++ b/buildtools/autogen/autogen/msc.py
@@ -1055,7 +1055,7 @@ def msc_ant(fd, var, ant, msc):
fd.write("callant%d.bat:\n" % callantno)
fd.write("\techo @set thisdir=%%~dp0>callant%d.bat\n" % callantno)
fd.write("\techo @set thisdir=%%thisdir:~0,-1%%>>callant%d.bat\n" %
callantno)
- fd.write("\techo @$(ANT) -f $(srcdir)\\build.xml
\"-Dbuilddir=%%thisdir%%\" \"-Djardir=%%thisdir%%\" %s>>callant%d.bat\n" %
(target, callantno))
+ fd.write("\techo @$(ANT) -f $(srcdir)\\build.xml
\"-Dbuilddir=%%thisdir%%\\%s\" \"-Djardir=%%thisdir%%\" %s>>callant%d.bat\n" %
(target, target, callantno))
fd.write("%s_ant_target: callant%d.bat\n" % (target, callantno))
fd.write("\tcallant%d.bat\n" % callantno)
callantno = callantno + 1
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -2254,15 +2254,22 @@ def randomPort(l,h) :
repeat = randomPortRepeat
port = 0
rpt = 0
+ ports = []
while rpt < repeat:
port = random.randrange(l,h,1)
+ ports.append(port)
busy, host, Serrno, Serrstr, S = CheckPort(port)
S[0].close()
S[1].close()
if busy:
rpt = rpt + 1
+ port = 0
else:
break
+ else:
+ if sys.platform == 'linux2':
+ print 'Ports tried:',`ports`
+ os.system('netstat -ap')
return (port,host)
### randomPort(l,h) #
@@ -2277,14 +2284,13 @@ def CheckSocket2(env,SERVER) : #,SrvrEr
! Socket-Check failed for %sserver on <%s:%d> with #%d; '%s' !
""" % (SERVER, host, port, Serrno, Serrstr)
newport = eval(dft[SERVER+'PORT'])
- busy, host, Serrno, Serrstr, S = CheckPort(int(newport))
- if busy:
+ if newport == 0:
S[0].close()
S[1].close()
Smsg = Smsg + """
-! Socket-Check failed for %sserver on <%s:%d> with #%d; '%s' !
+! Socket-Check failed for %sserver on <%s> !
! Giving up after %d attepts !
-""" % (SERVER, host, int(newport), Serrno, Serrstr, randomPortRepeat)
+""" % (SERVER, host, randomPortRepeat)
return None, Smsg
env[SERVER+'PORT'] = newport
@@ -2928,7 +2934,7 @@ else:
HOST = HOST.split('.', 1)[0]
os.environ['HOST'] = HOST
# check the host port actually works
-_, HOST = randomPort(30000,39999);
+_, HOST = randomPort(30000,39999)
os.environ['HOST'] = HOST
if os.name == "nt":
@@ -3360,6 +3366,8 @@ def main(argv) :
#TODO:
# make sure, that PATHs are absolute
if THISFILE == "Mtest.py":
+ if env['MAPIPORT'] == 0:
+ ErrXit('Cannot find a workable MAPIPORT')
if env['MONETDB_MOD_PATH']:
env['setMONETDB_MOD_PATH'] = eval(dft['setMONETDB_MOD_PATH'])
else:
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list