Changeset: f1f5a4d95621 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f1f5a4d95621
Modified Files:
        testing/sqllogictest.py
Branch: Jun2023
Log Message:

Created sqllogictest for skipif/onlyif to distinguish operating system.
Use e.g. skipif system=Darwin to skip a test on the Mac.
The parameter is the output of Python's platform.system() function.


diffs (29 lines):

diff --git a/testing/sqllogictest.py b/testing/sqllogictest.py
--- a/testing/sqllogictest.py
+++ b/testing/sqllogictest.py
@@ -46,6 +46,7 @@ if architecture == 'AMD64':     # Window
     architecture = 'x86_64'
 if architecture == 'arm64':     # MacOS :-(
     architecture = 'aarch64'
+system = platform.system()
 
 skipidx = re.compile(r'create index .* \b(asc|desc)\b', re.I)
 
@@ -695,7 +696,7 @@ class SQLLogic:
                 continue
             while words[0] == 'skipif' or words[0] == 'onlyif':
                 if words[0] == 'skipif':
-                    if words[1] in ('MonetDB', f'arch={architecture}'):
+                    if words[1] in ('MonetDB', f'arch={architecture}', 
f'system={system}'):
                         skipping = True
                     elif words[1].startswith('threads='):
                         if nthreads is None:
@@ -704,7 +705,7 @@ class SQLLogic:
                         if words[1] == f'threads={nthreads}':
                             skipping = True
                 elif words[0] == 'onlyif':
-                    if words[1] not in ('MonetDB', f'arch={architecture}'):
+                    if words[1] not in ('MonetDB', f'arch={architecture}', 
f'system={system}'):
                         skipping = True
                     elif words[1].startswith('threads='):
                         if nthreads is None:
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to