Skip to content

qt-qml: test: Fix downloadQmlls test timeout by stubbing network fetch#525

Merged
OrkunTokdemir merged 9 commits into
qt-labs:devfrom
OrkunTokdemir:orkun_fix_test_download_qmlls_08_07_2026
Jul 13, 2026
Merged

qt-qml: test: Fix downloadQmlls test timeout by stubbing network fetch#525
OrkunTokdemir merged 9 commits into
qt-labs:devfrom
OrkunTokdemir:orkun_fix_test_download_qmlls_08_07_2026

Conversation

@OrkunTokdemir

Copy link
Copy Markdown
Collaborator

The test ran the real command, whose network fetch and download Mocha
does not wait on, exceeding the 10s timeout. Stub the global fetch
(following the qt-core pattern) so it completes without real network.

The test ran the real command, whose network fetch and download Mocha
does not wait on, exceeding the 10s timeout. Stub the global fetch
(following the qt-core pattern) so it completes without real network.
`cmake.build` only returns an exit code; compiler diagnostics go to the
CMake Tools output channel, which the test runner drops. So a CI build
failure shows only `rc=1` with no cause.

On non-zero rc, re-run `cmake --build` directly and echo its output
before the assertion fails, so the real error lands in the CI log.
@OrkunTokdemir OrkunTokdemir force-pushed the orkun_fix_test_download_qmlls_08_07_2026 branch 3 times, most recently from 67902aa to 7c966f9 Compare July 9, 2026 12:17
macos-latest was upgraded to macOS 26 ("Tahoe") / Xcode 26, whose SDK
removed the AGL framework. Qt 6.9.0's QtGui link interface still
references "-framework AGL", so linking the natvis test project (which
pulls in Gui/Widgets/Quick) failed with "ld: framework 'AGL' not found"
and the qt-cpp natvis tests could not build.

Qt removed the obsolete AGL dependency in 6.9.2 (QTBUG-137687), so bump
QT_VERSION_FOR_TEST 6.9.0 -> 6.9.2. Staying on the 6.9 line keeps the
NatVis type layouts stable, so the golden snapshots remain valid.
"No Qt kit available" hid the cause: qt-cpp reports it via
showWarningMessage, which never reaches CI stdout. Capture those
warnings and print them when no kit registers, to tell a failed
`qtpaths -query` from qtpaths never being discovered.
Stable cpptools makes gdb hang downloading separate debug info from
debuginfod on launch, so the debugger never reaches the breakpoint and
the natvis tests fail with "Timed out waiting for 'stopped'". Workarounds
(empty DEBUGINFOD_URLS, "set debuginfod enabled off") were reported
insufficient upstream.

Install the pre-release cpptools, which carries the fix (>= 1.33.0,
MIEngine#1561), and drop the ineffective DEBUGINFOD_URLS workaround.

See microsoft/vscode-cpptools#14458
Querying qtpaths/qmake spawns a process that dynamically links Qt; on a
cold or loaded machine (e.g. CI) the first invocation can take several
seconds. The 1s timeout was too tight and intermittently failed Qt kit
registration. Use a 30s timeout instead.
Pre-release cpptools now applies the QString NatVis DisplayString to the
nested member of QPair<QString,int>, so the value renders as
"(pair-key, 42)" instead of the old raw "(0xADDR u\"pair-key\", 42)".
Align the darwin golden with win32/linux.
@OrkunTokdemir OrkunTokdemir force-pushed the orkun_fix_test_download_qmlls_08_07_2026 branch from b39e1cc to d8deeb0 Compare July 9, 2026 15:14
Applying a Qt kit makes CMake Tools start a background reconfigure; the
helper's immediate cmake.configure raced with it, got deduped, and returned
-1 instead of running. Disable configureOnOpen/automaticReconfigure before
applying the kit and retry configure on a negative rc (real rc>0 failures
still surface).
Disabling configureOnOpen/automaticReconfigure fixed the macOS -1 race but
regressed Linux CI: the CMake Tools driver never bootstraps, so configure
returns -1 every attempt and configureWithRetry spins to the mocha timeout.
Drop the settings override and rely on the retry.
@OrkunTokdemir OrkunTokdemir requested a review from benchoq July 10, 2026 13:39
@OrkunTokdemir OrkunTokdemir merged commit 1bbb23b into qt-labs:dev Jul 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants