Repository navigation
test(android,harmonyos,linux,provision-kit): cover boot-failure and toolchain probe branches - #3433
Conversation
…oolchain probe branches Closes #3419
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…d-line-tools root Review follow-ups: make the still-booting poll actually overrun the boot deadline, and assert HARMONYOS_COMMAND_LINE_TOOLS contributes its derived toolchain directory to PATH.
|
This PR is ready at 4db8a5e. It only adds tests, so no production route changes. All 18 checks pass. I read the sources to trace branch reachability. I did not run the tests, the coverage run or the CRAP check, so the before/after CRAP numbers in the PR body are unverified. Not blocking, and you can take or leave these: the boot-timeout test in emulator-lifecycle.test.ts uses 80 ms polls against a 150 ms deadline and asserts exactly 2 calls, so about 20 ms of overshoot would leave 1 call and fail it (fake timers or a lower-bound assertion would remove the wall-clock dependence); the The two earlier inline threads, on the boot-timeout test (#3433 (comment)) and on the HarmonyOS toolchain PATH order (#3433 (comment)), are fixed at this head, so please resolve them. No other open threads apply. Nothing else blocks human review. |
Summary
Covers the coverage-based CRAP findings from #3419 (part of #3414) by testing each function through its package's existing public seam — no production exports or test-only DI. Before → after CRAP:
emulator-lifecycle.tsnormalizedAndroidBootFailureReasonemulator-lifecycle.tsbuildAndroidBootFailureDetailsemulator-lifecycle.tsbuildAndroidBootErrordoctor.tsprobeAndroidReverseboot-diagnostics.tsbootFailureHinthdc.tsensureHarmonyToolchainPathConfiguredsnapshot.tsrectAreaAlso clears the same file's
matchescomparator (30.0 → 5.0) via thereadLinuxTextAtPointentry point. Boot failures exercisewaitForAndroidBootwith the package's mocked adb executor; HarmonyOS PATH wiring uses a real temp toolchain layout throughisExecutablePath.Closes #3419
Validation
Head
84700ba61.pnpm check:affected --runpasses (all runnable checks, 56 related tests).pnpm check:coverage-crap --allon a coverage run of the owned files reports "no function(s) at or above 30".pnpm typecheck,pnpm formatclean; fallow audit finds no issues in the 5 changed files.