test(executor): add async execute() and environment API tests#1497
Conversation
Adds 10 new tests covering the async execute() path, setEnvironment(),
environment(), and cancelNext() — areas previously untested.
Async tests use QStandardPaths::findExecutable("sh") for the binary
path because Executor::execute() resolves names relative to the
application directory rather than PATH.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR extends the ChangesExecutor test coverage
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1497 +/- ##
==========================================
+ Coverage 49.86% 50.00% +0.13%
==========================================
Files 44 44
Lines 4386 4386
==========================================
+ Hits 2187 2193 +6
+ Misses 2199 2193 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Summary
Executor: asyncexecute()signal/stdout/exit-code/starting/sequential/workdir,setEnvironment()/environment(), andcancelNext()in both the empty-queue and while-running casesenvironmentDefaultsEmpty,setAndGetEnvironment,cancelNextEmptyReturnsMinusOne) run on all platforms; async tests remain in the existing#ifndef Q_OS_WINguardQStandardPaths::findExecutable("sh")for the binary path in async tests becauseExecutor::execute()resolves names relative to the application directory rather thanPATHQTRY_COMPARE_WITH_TIMEOUTinstead ofspy.wait()for reliable async signal polling; sorts both lists beforeQCOMPAREto handleQProcess::setEnvironment()'s internal sortTest plan
31 passed, 0 failed, 1 skipped) with./tests/auto/executor/tst_executor -platform offscreenclang-formatapplied🤖 Generated with Claude Code
Summary by CodeRabbit