269 Commits

Author SHA1 Message Date
Hiroshi Miura
df4751a1a4 style(tests): reformat test_install.py by black
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2025-12-14 11:56:08 +09:00
Hiroshi Miura
5572fc9127 style: Improve readability by reformatting long lines
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2025-12-14 11:20:06 +09:00
tsteven4
ce91d93eee fix installation of extensions for windows arm64.
The qtwebengine extension for WoA appeared in 6.10.0.
The qtpdf extension for WoA appeared in 6.9.2.
Support for both the cross compiled and native versions is included
and tested.
2025-09-16 11:32:28 -06:00
Alexandre 'Kidev' Poumaroux
0ada55c475 Fix lint and tests 2025-03-23 02:49:14 +01:00
Alexandre 'Kidev' Poumaroux
bb523be201 Add --use-official-installer to install-qt 2025-03-18 00:32:57 +01:00
Hiroshi Miura
7abca71379 style: apply black for test
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2025-03-16 18:06:00 +09:00
J.D. Purcell
47e2dea3a9 Update tests to recognize new log output 2025-03-12 10:05:50 -04:00
J.D. Purcell
a19e36e80d Fix error running official installer on macOS 2025-03-11 09:46:33 -04:00
Hiroshi Miura
752b3adabd style: apply black for test
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2025-03-11 14:33:01 +09:00
Hiroshi Miura
3b9a1a98ae style: apply black
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2025-03-04 16:20:24 +09:00
Hiroshi Miura
ecc4e4e873 style: fix linter errors
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2025-03-04 11:44:12 +09:00
Hiroshi Miura
122377cb8a refactor: removal of duplicated download_installer functionality
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2025-03-04 11:43:53 +09:00
Hiroshi Miura
edc423a239 feat: install-qt-official checks hash for downloaded binary
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2025-03-04 09:00:58 +09:00
Alexandre Poumaroux
5d699b9ebf Commercial fixes, CI tests, more tests, coverage (#883)
* Add authentication flags for list-qt-commercial, add tests for coverage

* Add dry run

* Make tests really use auth since secrets have been added, fix some indents

* Fix auth issue, rename user 'email, and password 'pw'

* Fix modules param type

* Update commands names
2025-02-22 09:56:56 +09:00
tsteven4
06b821965d fix list-src,doc,examples for >= 6.8.0 (#880)
Some checks are pending
Test on GH actions environment / test (standard, ubuntu-latest, 3.12, 6.6.3) (push) Waiting to run
Test on GH actions environment / test (standard, ubuntu-latest, 3.12, 6.8.0) (push) Waiting to run
Test on GH actions environment / test (standard, ubuntu-latest, 3.12, 6.8.1) (push) Waiting to run
Check tox tests / Check packaging 📦 (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
Publish Python 🐍 distributions 📦 to PyPI / Build and publish Python 🐍 distributions 📦 to PyPI (push) Waiting to run
Test on GH actions environment / test (binary, windows-latest, 3.12, 6.6.3) (push) Waiting to run
Test on GH actions environment / test (standard, ubuntu-latest, 3.12, 6.5.3) (push) Waiting to run
Test on GH actions environment / test (standard, windows-latest, 3.12, 6.5.3) (push) Waiting to run
Test on GH actions environment / test (standard, windows-latest, 3.12, 6.6.3) (push) Waiting to run
Test on GH actions environment / test (standard, windows-latest, 3.12, 6.7.3) (push) Waiting to run
* fix list-src,doc,examples for >= 6.8.0

* generalize test_list_src_doc_examples_cli for version

* tweak expected url patterns.
2025-01-28 20:55:01 +09:00
Alexandre Poumaroux
cbe159f38a Add support for commercial versions of Qt (#878)
* Add install-qt-commercial feature and tests

* Make the auto-answers parameters, fix linter issues

* Fork and execv instead of using subprocess

* Return to simpler process execution method version

* Fix test

* Move commercial installer into its own file

* Fix shadowing of symbol platform causing errors

* Adapt test_cli for argparse format changes on py 3.13+

* Fix some errors, monkeypatch install test

* Add --override super command

* Properly handle --override and grab all the remaining commands when no quotes are given

* Fix tests

* Add base for modules, some niche features are not yet entirely implemented, and there are no updates to the testsuite

* Fix some mistakes

* Fix errors made with the monkeypatch, update Settings to make sure its init

* Tests commercial (#20)

* Full support of installation of all modules and addons
* Add auto setup of cache folder for each OS, add unattended parameter
* Fix settings folders
* Add graceful error message for overwrite case

* Fix windows issue

* Hidden summon works

* Remove both subprocess direct calls

* Dipose of temp folder

* Fix path issue

* Add list-qt-commercial command

* Fix help info

* Make no params valid for list-qt-commercial

* Fix lint errors, and param overflow when no args are passed to list

* Fix search

* Add tests for coverage, fix lint

* Test for overwriting, and for cache usage coverage

* Return to clean exec, ignoring CI fail to preserve code clarity

* Fix parsing of subprocess.run output for some python versions

* Make output more readable in console for list-qt-commercial

* Forward email and password to list request for users without a qtaccount.ini

* Change default settings

* Fix lint errors

* Fix check error
2025-01-28 20:51:53 +09:00
Alexandre Poumaroux
a09b5cee28 Fix WASM (#846)
* Rewrite WASM support

* Add WASM tests to CI, update CI to test more the latest versions, add auto EMSDK version detection function

* Fix some mistakes, typos, moved emsdk version function into BuildJob

* Fix issue related to extensions interfering with wasm on 6.8+

* Fix tests

* Remove dep on Version in CI

* Remove safety before patch

* handle cases where extensions don't exist.

for example with windows desktop 6.8.1 win64_msvc2022_arm64_cross_compiled
both qtwebengine and qtpdf don't exist.

Signed-off-by: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com>

* for --long-modules assume extension doesn't exist on download error.

Signed-off-by: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com>

* for --modules assume extension doesn't exist for download failures.

Signed-off-by: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com>

* reformat with black

Signed-off-by: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com>

* fix flake8 regression that doesn't occur locally.

Signed-off-by: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com>

* Fix autodesktop by also updating the OS when searching for a valid desktop version to download

* Fix extension issue, reduce the possible retry for getting extensions to prevent server spam

* Fix CI asking for msvc2019 on 6.8+ but its no longer supported

* Make CI use C++20 and MSVC2022

* Fix linux build

* Update runners to windows-2022

Signed-off-by: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com>

* Fix patching

Signed-off-by: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com>

* Add back the semantic version changes to prevent crashes, add tests for it

* Update checks

* Cast 'https://mirrors.ustc.edu.cn' to the shadow realm

* Again

* Update settings.ini

* Update settings.ini

* Update settings.ini

* Remove one_rep on silent

* Update settings.ini

* Restore master settings, remove hash check

* ci: Use specific mirror

Attempt to work around download errors in Azure due to Qt's official download site often redirecting to mirrors to which the network connection is unstable

Signed-off-by: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com>

* Re enable hash checking

* Treat read timeout error during download as connection error

Signed-off-by: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com>

* Add test for modules in WASM with autodesktop

* Fix format

* Fix test

* Make '--autodesktop' trigger its own install process, and test it

* Fix older autodesktop tests

* Add mock update files for 680 wasm, add test for wasm 680 autodesktop

* Passes the additional tests

* Fix format

* Improve coverage, fix format

* Fix tests and improve logging or install

* Fix format

* Fix regression in other tests

* Use flavor

* Fix line len

* Fix codeql

* Fix list-qt for WASM arch on 6.5.x and 6.6.x, restore to original download URL

* Fix test error

* Revert ci settings URL as it is never used by clients, only in CI

* Add comment for clarity in ci/settings.ini

---------

Signed-off-by: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com>
Co-authored-by: tsteven4 <13596209+tsteven4@users.noreply.github.com>
Co-authored-by: J.D. Purcell <jdpurcell@gmail.com>
2025-01-06 15:35:40 +09:00
tsteven4
6dc847e599 enhance test_install to exercise extensions 2024-12-26 11:39:08 -07:00
J.D. Purcell
2e7a1cb4b9 Update test script to recognize new patch behavior 2024-12-14 18:46:44 -05:00
tsteven4
a590b6e208 attempt to fix types test 2024-11-30 16:21:59 -07:00
Hiroshi Miura
fddd634b6d style: remove unused field and apply black
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2024-09-29 12:30:16 +09:00
Hiroshi Miura
2a8eb72c0b refactor: test: update cases and expectations
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2024-09-29 12:17:44 +09:00
Hiroshi Miura
6c2960dce7 fix: test: update expectations
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2024-08-05 08:01:13 +09:00
Hiroshi Miura
307d856f0c fix: remove logic to check combination
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2024-08-05 07:42:02 +09:00
Andrew Wason
1615782c25 Fixes and tests. Untested Azure pipeline support. 2024-03-05 18:37:15 -05:00
Hiroshi Miura
c059593817 Merge pull request #705 from ddalcino/topic/ddalcino/cli/warn-ext7zr
Log a warning when aqtinstall falls back to an external 7z extraction tool
2023-09-12 07:35:30 +09:00
Dave Dalcino
5c2c18d96b Fix installation of win64_msvc2019_arm64 arch
This fixes the behavior of the `--autodesktop` flag and the updater,
when installing win64_msvc2019_arm64 for desktop targets.
2023-09-06 18:09:02 -07:00
Dave Dalcino
772edb83bf Fix test_install that fails on Python<3.11.4
The tarfile test does not permit the new warning, "Extracting may be
unsafe; consider updating Python to 3.11.4 or greater". This change
should allow the test to succeed when running on 3.11.4 and below.
2023-08-28 05:44:03 -07:00
Dave Dalcino
0ffc48a1b1 remove unused import 2023-08-28 05:28:46 -07:00
Dave Dalcino
112080e6cb black 2023-08-28 05:28:46 -07:00
Dave Dalcino
772c20aa4d Remove duplicated test 2023-08-28 05:28:45 -07:00
Dave Dalcino
85037194fe Remove fallback parameter 2023-08-28 05:28:45 -07:00
Dave Dalcino
9752164811 Add test for refactored _set_sevenzip 2023-08-28 05:28:45 -07:00
Dave Dalcino
c3195c9d64 Use 'tar' filter when extracting tarfiles
This is to address a SNYK warning. The new code will only run on Python
3.11.4 and above
2023-08-27 18:45:46 -07:00
Dave Dalcino
7c0de86f78 Add tests for sdktool: install-tool and list-tool 2023-05-24 15:38:13 -07:00
Dave Dalcino
c9732c7c2c Fix broken test 2023-03-25 11:45:15 -07:00
Dave Dalcino
e4fa75147f Test nonspecific OSError 2023-03-14 01:24:03 -07:00
Dave Dalcino
8dd56ff461 Catch OSError(errno.ENOSPC) and PermissionError
When the destination drive is not writable or has insufficient space,
these exceptions are raised during `run_installer`. Unless they are
caught and dealt with, `aqtinstall` requests that the user file a bug
report. This change catches these errors and prints a nice error message
instead of requesting a bug report.
2023-03-13 17:48:09 -07:00
Dave Dalcino
9b102de2b4 Test Cli._select_unexpected_modules for missing qt
This adds coverage for the situation where there is no known list of
modules, since the Qt version is unknown.
2023-02-16 14:53:56 -08:00
Dave Dalcino
6a0c174e01 Improve warning messages re: unknown aqt arguments
This improves the warnings about unknown versions, modules, and
architectures of Qt, so that it is more explicit what the message
actually means.

This changes the purpose of `Cli._check_modules_arg` from checking if
modules exist in combinations.json, to returning a list of modules
that do not exist in that file. The function has been renamed as well.
This change was necessary to make the warning message more informative.
2023-02-16 14:01:39 -08:00
Dave Dalcino
b8222a4a4f Test resilience to missing wasm Updates.xml files
Makes sure that MetadataFactory can still produce a list of
architectures when the standard Updates.xml file is present, but the
expected wasm Updates.xml file is not. This should prevent failures
in the future if the Qt devs decide to change the way WASM works, as
they did with Qt 6.5.0.
2023-02-11 13:31:32 -08:00
Dave Dalcino
e3c7d14c3f Add tests for qt 6.5.0 wasm 2023-02-11 10:35:48 -08:00
iakov
77910835c2 Make black happy with new formatting for tests 2023-02-03 20:12:01 +03:00
iakov
cc7be3dc29 Make prefix optional
Co-authored-by: David Dalcino <ddalcino@users.noreply.github.com>
2023-02-03 20:08:03 +03:00
iakov
bc10ba9e85 Pin EMSDK version for build where useful
Also fix test that fails at the moment
2023-02-03 12:06:03 +03:00
Dave Dalcino
e30d3198a4 Fix errors in install-* caused by duplicate 'modules'
Fixes #632
2023-01-07 06:57:28 -08:00
Hiroshi Miura
0f1010baee Load settings.ini in child process
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2022-12-05 19:50:51 +09:00
Dave Dalcino
839cf6e2f3 Patch according to new installscript.qs rules
This removes the inappropriate ENV variables set in steps.yml.
It's not wrong to set those variables, but the official Qt installer
patches the defaults properly, so you don't have to do it manually.
It's wrong to expect our users to set these.

This also patches target_qt.conf to add HostLibraryExecutables.
2022-12-04 16:44:45 -08:00
Dave Dalcino
6db730e659 fix backslashes on windows 2022-12-04 10:42:49 -08:00
Dave Dalcino
18c8259e8c Set executable file permissions for qmake 2022-12-04 10:42:48 -08:00