Changeset: 9ad7eae9494f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/9ad7eae9494f
Modified Files:
testing/sqllogictest.py
Branch: Sep2022
Log Message:
No os.uname() on Windows, so use platform.machine() instead.
diffs (33 lines):
diff --git a/testing/sqllogictest.py b/testing/sqllogictest.py
--- a/testing/sqllogictest.py
+++ b/testing/sqllogictest.py
@@ -35,12 +35,16 @@ import MonetDBtesting.malmapi as malmapi
import hashlib
import re
import sys
-import os
+import platform
import importlib
import MonetDBtesting.utils as utils
from pathlib import Path
from typing import Optional
+architecture = platform.machine()
+if architecture == 'AMD64': # Windows :-(
+ architecture = 'x86_64'
+
skipidx = re.compile(r'create index .* \b(asc|desc)\b', re.I)
class UnsafeDirectoryHandler(pymonetdb.SafeDirectoryHandler):
@@ -687,9 +691,9 @@ class SQLLogic:
if not words:
continue
while words[0] == 'skipif' or words[0] == 'onlyif':
- if words[0] == 'skipif' and words[1] in ('MonetDB',
f'arch={os.uname().machine}'):
+ if words[0] == 'skipif' and words[1] in ('MonetDB',
f'arch={architecture}'):
skipping = True
- elif words[0] == 'onlyif' and words[1] not in ('MonetDB',
f'arch={os.uname().machine}'):
+ elif words[0] == 'onlyif' and words[1] not in ('MonetDB',
f'arch={architecture}'):
skipping = True
self.writeline(line.rstrip())
line = self.readline()
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]