Skip to content

test: Updating older cross-build smoke tests (iOS, Android)#7487

Draft
thesuzerain wants to merge 15 commits into
mainfrom
test-updating-older-cross-build-smoke-tests
Draft

test: Updating older cross-build smoke tests (iOS, Android)#7487
thesuzerain wants to merge 15 commits into
mainfrom
test-updating-older-cross-build-smoke-tests

Conversation

@thesuzerain

@thesuzerain thesuzerain commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

This is a draft PR bringing in smoke tests scripts for building application-services against various targets (Android and iOS here, HNT to come, see below). It deprecates some older similar tests that are very out of date, and remakes them with up-to-date building methods (and more test flexibility).

I used existing helpers from the existing smoke tests where possible.

See: build instructions for iOS and build instructions for Fenix for context about the steps.

This currently makes no breaking changes. It is also thought that the deprecated smoke tests have long fallen out of use.

Remaining work:

We want to build against HNT if possible as well, but currently, HNT doesn’t have a system for building against a local a-s like the other two do. There are a couple possibilities I've explored (eg: redirecting cargo paths) but none that have been trivial. As it may require non-test-script changes, I would propose we do that in another PR.

There is also a good amount of iOS and Android tests that fail naturally (seemingly even in clean unrelated builds), and most possible regressions in a-s don’t cause a build or test failure, so it may be prudent in the future to make to extend iOS/Android tests to cover a-s behaviour specifically now that we have these scripts.

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

MOZILLA_RUST_COMPONENTS_AS_PATH = "megazords/ios-rust/MozillaRustComponents.xcframework"


def replace_swift_package_artifact(ios_repo_path, as_repo_path):

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love using regex here but given how often this artifact file is updated (with hashes, etc) it doesn't really seem possible to use a fixture for it.

Comment thread automation/build_against_all.py
@thesuzerain
thesuzerain requested a review from jonesetc July 20, 2026 19:31
Comment thread automation/build_against_all.py Outdated
# - xcode + xcodebuild + xcodetools setup and running (a successful build of the firefox-ios repository)
# Arguments:
# --action => Can be either `run-tests` (default) or `build-without-testing`
# --use-local-repo => Use a local firefox-ios repository instead (at the provided path). Exclusive with `remote-repo-url`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks outdated? There is a --firefox-dir FIREFOX_DIR, but no --use-local-repo or --remote-repo-url

Comment thread automation/build_against_fenix.py
@jonesetc

Copy link
Copy Markdown
Member

Was able to force an android regression in testing with this patch:

diff --git a/components/ads-client/src/lib.rs b/components/ads-client/src/lib.rs
index 2088ee16c..1279423e9 100644
--- a/components/ads-client/src/lib.rs
+++ b/components/ads-client/src/lib.rs
@@ -72,10 +72,10 @@ impl MozAdsClient {
     #[uniffi::method(default(options = None))]
     pub fn record_impression(
         &self,
-        impression_url: String,
+        impression_url_foo: String,
         options: Option<MozAdsCallbackOptions>,
     ) -> AdsClientApiResult<()> {
-        let url = AdsClientUrl::parse(&impression_url).map_err(|e| {
+        let url = AdsClientUrl::parse(&impression_url_foo).map_err(|e| {
             ComponentError::RecordImpression(CallbackRequestError::InvalidUrl(e).into())
         })?;
         let ohttp = options.map(|o| o.ohttp).unwrap_or(false);

and running automation/build_against_fenix.py --prefix-ff fenix --prefix-as ads-client --firefox-dir ../firefox produced:

...
> Compiling firefox with mozconfig with `./gradlew fenix:assembleDebug` (mozconfig=`/var/folders/lr/zvwpm2dn5n133j0st4z6n6c00000gn/T/tmphrsr28ca-test-fenix/mozconfig_android`)...
e: file:///.../firefox/mobile/android/android-components/components/service/mars/src/main/java/mozilla/components/service/mars/MozAdsUseCases.kt:50:70 No parameter with name 'impressionUrl' found.
e: file:///.../firefox/mobile/android/android-components/components/service/mars/src/main/java/mozilla/components/service/mars/MozAdsUseCases.kt:50:70 No value passed for parameter 'impressionUrlFoo'.

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.

2 participants