aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2023-01-15 19:52:21 +0000
committerJoão Valverde <j@v6e.pt>2023-01-16 11:54:43 +0000
commit7e6266d33da6651c82a7a94b79ebc7a9865ca7d6 (patch)
tree28452c12cb34006f7326c38649262716c1f32575 /test
parent1e1e733d8cae8e6f6b6f463160061896cb1daed2 (diff)
MSYS2: Add Lua 5.1 support and fix test suite failures
Diffstat (limited to 'test')
-rw-r--r--test/fixtures_ws.py1
-rw-r--r--test/suite_clopts.py2
-rw-r--r--test/suite_wslua.py3
3 files changed, 6 insertions, 0 deletions
diff --git a/test/fixtures_ws.py b/test/fixtures_ws.py
index 8f4ba7e0d9..10fb5522bd 100644
--- a/test/fixtures_ws.py
+++ b/test/fixtures_ws.py
@@ -177,6 +177,7 @@ def features(cmd_tshark, make_env):
return types.SimpleNamespace(
have_x64='Compiled (64-bit)' in tshark_v,
have_lua='with Lua' in tshark_v,
+ have_lua_unicode='(with UfW patches)' in tshark_v,
have_nghttp2='with nghttp2' in tshark_v,
have_kerberos='with Kerberos' in tshark_v,
have_gnutls='with GnuTLS' in tshark_v,
diff --git a/test/suite_clopts.py b/test/suite_clopts.py
index 553c1dad47..14138f0162 100644
--- a/test/suite_clopts.py
+++ b/test/suite_clopts.py
@@ -209,6 +209,8 @@ class case_tshark_dump_glossaries(subprocesstest.SubprocessTestCase):
'''Folders output with unicode'''
if not features.have_lua:
self.skipTest('Test requires Lua scripting support.')
+ if sys.platform == 'win32' and not features.have_lua_unicode:
+ self.skipTest('Test requires a patched Lua build with UTF-8 support.')
proc = self.assertRun((cmd_tshark, '-G', 'folders'), env=unicode_env.env)
out = proc.stdout_str
pluginsdir = [x.split('\t', 1)[1] for x in out.splitlines() if x.startswith('Personal Lua Plugins:')]
diff --git a/test/suite_wslua.py b/test/suite_wslua.py
index a564860189..1c69c10ece 100644
--- a/test/suite_wslua.py
+++ b/test/suite_wslua.py
@@ -8,6 +8,7 @@
#
'''Wireshark Lua scripting tests'''
+import sys
import filecmp
import os.path
import shutil
@@ -284,6 +285,8 @@ class case_wslua_unicode(subprocesstest.SubprocessTestCase):
'''Check handling of unicode paths.'''
if not features.have_lua:
self.skipTest('Test requires Lua scripting support.')
+ if sys.platform == 'win32' and not features.have_lua_unicode:
+ self.skipTest('Test requires a patched Lua build with UTF-8 support.')
# Prepare test environment, put files in the right places.
uni_script = os.path.join(unicode_env.pluginsdir, 'script-Ф-€-中.lua')