Changeset: 83ea99f63457 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=83ea99f63457
Modified Files:
        monetdb5/tools/Tests/All
        testing/Mtest.py.in
Branch: ipv6
Log Message:

Add HAVE_IPV6 conditional for testing.


diffs (35 lines):

diff --git a/monetdb5/tools/Tests/All b/monetdb5/tools/Tests/All
--- a/monetdb5/tools/Tests/All
+++ b/monetdb5/tools/Tests/All
@@ -1,3 +1,3 @@
 mserver5--help
 mclient-t-s
-mserver5-ipv6
+HAVE_IPV6?mserver5-ipv6
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -439,6 +439,7 @@ CONDITIONALS = {
     'MERCURIAL'            : "",
     'RELEASERUN'           : "",
     'BAD_HOSTNAME'         : "",
+    'HAVE_IPV6'            : "",
 }
 
 # a bunch of classes to help with generating (X)HTML files
@@ -4101,6 +4102,15 @@ def main(argv) :
         except:
             CONDITIONALS['BAD_HOSTNAME'] = '#' # True
 
+    s = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
+    try:
+        s.bind(('::1', int(env['MAPIPORT'])))
+    except socket.error as err:
+        CONDITIONALS['HAVE_IPV6'] = '' # False
+    else:
+        CONDITIONALS['HAVE_IPV6'] = '#' # True
+    s.close()
+
     # read '.Mapprove.rc'
     if THISFILE == 'Mapprove.py':
         f = os.path.join(TSTTRGBASE, TSTPREF, '.Mapprove.rc')
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to