-
-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix WASM #846
Fix WASM #846
Changes from 6 commits
de06f45
7ec6970
1df829a
cacabe8
11470f9
73bc8ad
77dff51
5d80b7c
001bbc8
4408ba6
c6955a6
dfc1d97
c8ec8b8
44c7762
c40af54
0008f42
592f875
3f108bc
1aa5216
6e785f0
356a2b8
bbaa833
29358b1
1a52e5f
7f695c4
07ff4ce
b92d40f
2c7ba14
b734cdd
7a2a41b
2288b1d
3568115
7cde90d
de6e325
bbd31a9
2e8abc2
f014c69
06a5098
aad5871
37ae2fa
44f1a90
84fad94
f9f1417
93f05d0
b14f120
0cd24a0
c9451c3
4dbb72f
eca7ef6
a46f3a7
9078341
0343d61
a5a075b
08328f2
3987df3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"architectures": [ | ||
"wasm_multithread" | ||
], | ||
"modules_by_arch": { | ||
"wasm_multithread": [ | ||
"qtserialbus", | ||
"qtwebchannel", | ||
"qtconnectivity", | ||
"qtlanguageserver", | ||
"qtquickeffectmaker", | ||
"qtimageformats", | ||
"qtinsighttracker", | ||
"qtwebsockets", | ||
"qtquick3dphysics", | ||
"qt3d", | ||
"qthttpserver", | ||
"qtpdf", | ||
"qtdatavis3d", | ||
"qtsensors", | ||
"qtwebview", | ||
"qtnetworkauth", | ||
"qtgraphs", | ||
"qtmultimedia", | ||
"qtremoteobjects", | ||
"qtvirtualkeyboard", | ||
"qtcharts", | ||
"qtlottie", | ||
"qtgrpc", | ||
"qtspeech", | ||
"qtlocation", | ||
"qtserialport", | ||
"qtwebengine", | ||
"qtscxml", | ||
"qtpositioning" | ||
] | ||
} | ||
} |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"architectures": [ | ||
"wasm_singlethread" | ||
], | ||
"modules_by_arch": { | ||
"wasm_singlethread": [ | ||
"qtserialbus", | ||
"qtwebchannel", | ||
"qtconnectivity", | ||
"qtlanguageserver", | ||
"qtquickeffectmaker", | ||
"qtimageformats", | ||
"qtinsighttracker", | ||
"qtwebsockets", | ||
"qtquick3dphysics", | ||
"qt3d", | ||
"qthttpserver", | ||
"qtpdf", | ||
"qtdatavis3d", | ||
"qtsensors", | ||
"qtwebview", | ||
"qtnetworkauth", | ||
"qtgraphs", | ||
"qtmultimedia", | ||
"qtremoteobjects", | ||
"qtvirtualkeyboard", | ||
"qtcharts", | ||
"qtlottie", | ||
"qtgrpc", | ||
"qtspeech", | ||
"qtlocation", | ||
"qtserialport", | ||
"qtwebengine", | ||
"qtscxml", | ||
"qtpositioning" | ||
] | ||
} | ||
} |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"architectures": [ | ||
"wasm_multithread" | ||
], | ||
"modules_by_arch": { | ||
"wasm_multithread": [ | ||
"qtspeech", | ||
"qtdatavis3d", | ||
"qtwebsockets", | ||
"qtgraphs", | ||
"qtmultimedia", | ||
"qtlottie", | ||
"qtremoteobjects", | ||
"qtimageformats", | ||
"qtinsighttracker", | ||
"qtsensors", | ||
"qtscxml", | ||
"qtserialport", | ||
"qtquick3dphysics", | ||
"qtpdf", | ||
"qtpositioning", | ||
"qtcharts", | ||
"qtvirtualkeyboard", | ||
"qtlocation", | ||
"qtconnectivity", | ||
"qtserialbus", | ||
"qt3d", | ||
"qthttpserver", | ||
"qtquicktimeline", | ||
"qtlanguageserver", | ||
"qtquickeffectmaker", | ||
"qt5compat", | ||
"qtwebchannel", | ||
"qtshadertools", | ||
"qtnetworkauth", | ||
"qtquick3d", | ||
"qtgrpc", | ||
"qtwebengine", | ||
"qtwebview" | ||
] | ||
} | ||
} |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"architectures": [ | ||
"wasm_singlethread" | ||
], | ||
"modules_by_arch": { | ||
"wasm_singlethread": [ | ||
"qtspeech", | ||
"qtdatavis3d", | ||
"qtwebsockets", | ||
"qtgraphs", | ||
"qtmultimedia", | ||
"qtlottie", | ||
"qtremoteobjects", | ||
"qtimageformats", | ||
"qtinsighttracker", | ||
"qtsensors", | ||
"qtscxml", | ||
"qtserialport", | ||
"qtquick3dphysics", | ||
"qtpdf", | ||
"qtpositioning", | ||
"qtcharts", | ||
"qtvirtualkeyboard", | ||
"qtlocation", | ||
"qtconnectivity", | ||
"qtserialbus", | ||
"qt3d", | ||
"qthttpserver", | ||
"qtquicktimeline", | ||
"qtlanguageserver", | ||
"qtquickeffectmaker", | ||
"qt5compat", | ||
"qtwebchannel", | ||
"qtshadertools", | ||
"qtnetworkauth", | ||
"qtquick3d", | ||
"qtgrpc", | ||
"qtwebengine", | ||
"qtwebview" | ||
] | ||
} | ||
} |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -416,11 +416,54 @@ def expected_windows_desktop_plus_wasm_5140(is_wasm_threaded: bool) -> Dict: | |
) | ||
else: | ||
input_filenames = "windows-5140-expect.json", "windows-5140-wasm-expect.json" | ||
|
||
to_join = [json.loads((Path(__file__).parent / "data" / f).read_text("utf-8")) for f in input_filenames] | ||
return { | ||
"architectures": [arch for _dict in to_join for arch in _dict["architectures"]], | ||
"modules_by_arch": {k: v for _dict in to_join for k, v in _dict["modules_by_arch"].items()}, | ||
} | ||
|
||
result = {"architectures": [], "modules_by_arch": {}} | ||
|
||
# Gather architectures from all sources | ||
for source in to_join: | ||
result["architectures"].extend(source["architectures"]) | ||
if "modules_by_arch" in source: | ||
result["modules_by_arch"].update(source["modules_by_arch"]) | ||
|
||
# Remove duplicates while preserving order | ||
seen = set() | ||
result["architectures"] = [x for x in result["architectures"] if not (x in seen or seen.add(x))] | ||
|
||
return result | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"host, target, version, arch, expect_arches", | ||
[ | ||
("all_os", "wasm", "6.7.3", "", {"wasm_singlethread", "wasm_multithread"}), | ||
("all_os", "wasm", "6.8.0", "", {"wasm_singlethread", "wasm_multithread"}), | ||
], | ||
) | ||
def test_list_wasm_arches(monkeypatch, capsys, host: str, target: str, version: str, arch: str, expect_arches: Set[str]): | ||
def _mock_fetch_http(_, rest_of_url: str, *args, **kwargs) -> str: | ||
|
||
if rest_of_url.endswith("wasm_singlethread/Updates.xml"): | ||
if version >= "6.8.0": | ||
return (Path(__file__).parent / "data" / "all_os-680-wasm-single-update.xml").read_text("utf-8") | ||
else: | ||
return (Path(__file__).parent / "data" / "all_os-673-wasm-single-update.xml").read_text("utf-8") | ||
elif rest_of_url.endswith("wasm_multithread/Updates.xml"): | ||
if version >= "6.8.0": | ||
return (Path(__file__).parent / "data" / "all_os-680-wasm-multi-update.xml").read_text("utf-8") | ||
else: | ||
return (Path(__file__).parent / "data" / "all_os-673-wasm-multi-update.xml").read_text("utf-8") | ||
return "" # Return empty HTML since we don't need it | ||
|
||
monkeypatch.setattr("aqt.metadata.getUrl", _mock_fetch_http) | ||
monkeypatch.setattr(MetadataFactory, "fetch_http", _mock_fetch_http) | ||
|
||
cli = Cli() | ||
cli._setup_settings() | ||
assert 0 == cli.run(["list-qt", host, target, "--arch", version]) | ||
out, err = capsys.readouterr() | ||
assert set(out.strip().split()) == expect_arches | ||
|
||
|
||
@pytest.mark.parametrize( | ||
|
@@ -435,7 +478,6 @@ def expected_windows_desktop_plus_wasm_5140(is_wasm_threaded: bool) -> Dict: | |
("--modules 5.14.0 win64_msvc2017_64", False, ["modules_by_arch", "win64_msvc2017_64"]), | ||
("--modules 6.5.0 wasm_singlethread", True, ["modules_by_arch", "wasm_singlethread"]), | ||
("--modules 6.5.0 wasm_multithread", True, ["modules_by_arch", "wasm_multithread"]), | ||
("--arch latest", True, ["architectures"]), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This used to work, but now it refers to 6.8.1, where there are less archs available when going to all_os wasm: only |
||
("--spec 5.14 --arch latest", False, ["architectures"]), | ||
("--arch 5.14.0", False, ["architectures"]), | ||
), | ||
|
@@ -492,7 +534,7 @@ def get_xml_filename() -> str: | |
assert output_set == expect_set | ||
|
||
|
||
def test_list_missing_wasm_updates(monkeypatch, capsys): | ||
def test_list_missing_wasm_updates_for_windows(monkeypatch, capsys): | ||
"""Require that MetadataFactory is resilient to missing wasm updates.xml files""" | ||
data_dir = Path(__file__).parent / "data" | ||
expect = set(json.loads((data_dir / "windows-620-expect.json").read_text("utf-8"))["architectures"]) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The category handling is a bit different for >= 6.8.0 non-wasm, category is now assumed to be qt in that case. category is either tools or qt. Is there any case where the directory component is tools{major}_{ver}{ext}, either before or after 6.8.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This return is there for the legacy versions. For Qt 6.8 non-WASM, this is returned:
All tests pass with this
to_folder
, older and newer versions of Qt, WASM of not