From 5490ee113132ff0131f67a4a0cc9486a81767718 Mon Sep 17 00:00:00 2001 From: Shyamnath Premnadh Date: Wed, 2 Nov 2022 17:24:42 +0100 Subject: test_tools(): qmlimportscanner fix - qmlimportscanner has no --help option - Use --importPath on the current directory as this would return an empty json array Pick-to: master Change-Id: I4f8a8353c179cadbb398fd43bbcef3f44d74f726 Reviewed-by: Friedemann Kleint --- scripts/packagetesting/testwheel.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/packagetesting/testwheel.py b/scripts/packagetesting/testwheel.py index 295a1fc..135d919 100644 --- a/scripts/packagetesting/testwheel.py +++ b/scripts/packagetesting/testwheel.py @@ -23,7 +23,7 @@ OPCUAVIEWER = 'opcua/opcuaviewer/main.py' WEBENGINE_EXAMPLE = 'webenginewidgets/tabbedbrowser/main.py' PROJECT_TOOL = "pyside6-project" TOOLS = ["deploy", "genpyi", ("lrelease", "-help"), "lupdate", "metaobjectdump", - "project", "qml", "qmlformat", "qmlimportscanner", "qmllint", + "project", "qml", "qmlformat", ("qmlimportscanner", "-importPath", "."), "qmllint", "qmlls","qmltyperegistrar", "qtpy2cpp", "rcc", "uic"] VERSION = (0, 0, 0) @@ -241,15 +241,17 @@ def test_tools(): print("\nTesting command line tools...") for tool in TOOLS: if isinstance(tool, tuple): - binary =f"pyside6-{tool[0]}" - help_option = tool[1] + tool_name, *arguments = tool + binary =f"pyside6-{tool_name}" else: binary =f"pyside6-{tool}" - help_option = "--help" + arguments = ["--help"] exit_code = 0 error = "" try: - exit_code, error = run_process([binary, help_option]) + cmd = [binary] + cmd.extend(arguments) + exit_code, error = run_process(cmd) except Exception as e: error = str(e) exit_code = 1 -- cgit v1.2.1