Changeset: f6ee1ad5ff06 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f6ee1ad5ff06 Modified Files: testing/Mtest.py.in Branch: Jul2012 Log Message:
If we can't find a port, don't continue with a failed port. diffs (47 lines): diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in --- a/testing/Mtest.py.in +++ b/testing/Mtest.py.in @@ -2261,6 +2261,7 @@ def randomPort(l,h) : S[1].close() if busy: rpt = rpt + 1 + port = 0 else: break return (port,host) @@ -2277,14 +2278,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 +2928,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 +3360,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 Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list