Changeset: fc255d753c2b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fc255d753c2b
Modified Files:
        testing/Mtest.py.in
Branch: default
Log Message:

Mtest: run CheckSocket2 also before trying if the server works

On some systems the initial server check fails because apparently the
port it chose is in use.  Run the standard CheckSocket2 function prior
to testing if the server runs, such that we check for a free port, and
only release it right before running the server.


diffs (17 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -3685,6 +3685,13 @@ def main(argv) :
             elif CONDITIONALS.has_key('BITS64') and CONDITIONALS['BITS64']:
                 env['TST_BITS'] = "64bit"
         else:
+            MAPIsockets, reason = CheckSocket2(env, "MAPI")
+            if MAPIsockets is None:
+                print "!!! could not find a free port"
+                sys.exit(1)
+            # Release reserved sockets and run the actual test
+            MAPIsockets[0].close()
+            MAPIsockets[1].close()
             if Check(splitcommand(env['exe']['Mserver'][1]) + ['--dbname=%s' % 
TSTPREF], 'clients.quit();\n'):
                 sys.exit(1)
             if GetBitsAndOIDsAndModsAndStaticAndThreads(env):
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to