- `PARSE_ARGV` should have been 1.
- `module_includes` target needs to be unique
See gerrit comment of previous change, and
https://gitlab.kitware.com/cmake/cmake/-/issues/26580
Amends: 8f2f4ad4688df4963982c489c80b84e115cda29d
Pick-to: 6.8 6.9
Task-number: QTBUG-98640
Change-Id: I82b85813f282ba1d5b4c938e59558e32647d4d86
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Similar `*_check` targets are created in `qt_internal_add_test`.
This change extends that implementation to auto cmake tests.
Note: These generated targets do not have additional dependencies, on
the build targets, unlike those generated by `qt_internal_add_test`.
You would need to (re-)run the build first separately and then run the
`*_check` target.
Fixes: QTBUG-98640
Pick-to: 6.8 6.9
Change-Id: I387f09570b6a4a345756133870c2eb9ef1cf3cf8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
cmd.exe has a huge problem when running the batch scripts locating
by paths contaning spaces and more the one set of quotes in arguments.
This can be worked around by using the 'call' command as the test
command runner.
Fixes: QTBUG-132258
Pick-to: 6.5 6.8 6.9
Change-Id: I9b6fb0f8bccf44456e4cb9b79f3c6bd3f9fe4678
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Use the quote-based argument wrapping when generating the command line
scripts for the tests. Apply the wrapping and escaping of the arguments
right before writing the script with the following advanced rules:
- if argument is already wrapped using quotes, skip wrapping
- if argument is a CMake variable, skip wrapping
- wrap the argument with qoutes otherwise
The above should cover the most common usecases in centralized place
when we generate the test wrapper scripts.
Remove other ways we wrap arguments in other places, like square bracket
wrapping in qt_internal_create_test_script.
Change-Id: If287dd75d6fb36260b5cf8a687215bda9c9fc1c0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The test system tried to run emrun (No .bat). This failed with a
file-not-found error on windows.
Also there was a test for (WIN32) when deciding to use cmd /c.
This test has been updated to (CMAKE_HOST_WIN32)
Also the aforementioned cmd /c was not present in the test run
output. It has been added.
Fixes: QTBUG-121996
Change-Id: Ib3c053949865038ad43abd479402f5e8e3c015ac
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The batch test target name is a useful thing to obtain in various
target-generating scripts.
Change-Id: I9605cf860fe1485e48108eba7e93f9064209d8fb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
It's needed for creating qmake build tests.
CMake / CTest has a limitation of not allowing to create single-config
tests when using a multi-config generator using the add_test(NAME)
signature.
Using add_test(NAME) forcefully creates per-config tests, which means
that it's not possible to just run ctest to execute tests, without
specifying a -C parameter, which we do in the CI.
qmake tests need to use the add_test(NAME) signature
to specify the WORKING_DIRECTORY option.
Because of the above limitation, a work around is to not use the
add_test(NAME) signature, but instead delegate the working directory
assignment to a generated cmake script, which
_qt_internal_create_command_script can already do.
Pick-to: 6.4
Task-number: QTBUG-96058
Change-Id: I6f439165994671724157f0edb7a71e351271e329
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>