Skip to content

fix(cli): skip platform-specific test assertions when tools are unavailable#5386

Open
Dieshen wants to merge 1 commit intoDioxusLabs:mainfrom
Dieshen:fix/skip-platform-tests-without-tools
Open

fix(cli): skip platform-specific test assertions when tools are unavailable#5386
Dieshen wants to merge 1 commit intoDioxusLabs:mainfrom
Dieshen:fix/skip-platform-tests-without-tools

Conversation

@Dieshen
Copy link

@Dieshen Dieshen commented Mar 18, 2026

Summary

  • Skip Android test assertions when NDK/SDK is not installed (get_android_tools() returns None)
  • Skip iOS test assertions when not running on macOS (cfg!(not(target_os = "macos")))
  • All other test assertions continue to run normally

Problem

test_harnesses::run_harness panics with Failed to get android tools on machines without the Android NDK/SDK installed. The same test also fails on non-macOS platforms for iOS assertions. This blocks contributors from running cargo test --workspace successfully.

Test plan

  • cargo test -p dioxus-cli --bin dx -- test_harnesses::run_harness passes on Windows without Android NDK
  • CI should pass since platform tools are likely available in CI, and the skip logic only triggers when tools are absent

…ilable

The test_harnesses::run_harness test panics on machines without
Android NDK/SDK installed and on non-macOS platforms for iOS
assertions. Skip these assertions gracefully instead of failing
the entire test suite.

- Android assertions: skip when get_android_tools() returns None
- iOS assertions: skip when not running on macOS
@Dieshen Dieshen requested a review from a team as a code owner March 18, 2026 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant