Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[android] don't build test summary harness code for android target #8070

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hyp
Copy link
Contributor

@hyp hyp commented Oct 23, 2024

when building tests for an Android target, SPM creates a test summary harness file as well. This file relies on test outpath that exists on the host machine, but not on the android device on which the test is actually running. Therefore, lets disable test observation for Android.

Motivation:

Before this change the test runner code generated by SPM contains SwiftPMXCTestObserver class that refers to the test output path on the host machine, which is incorrect, and doesn't work on an Android device.

Modifications:

Android target no longer supports test summary.

Result:

After this change my tests work as expected on Android device without SwiftPMXCTestObserver issues.

when building tests for an Android target, SPM creates a test summary harness file as well. This file relies on test outpath that exists on the host machine, but not on the android device on which the test is actually running. Therefore, lets disable test observation for Android.
@hyp
Copy link
Contributor Author

hyp commented Oct 23, 2024

@swift-ci please test

@finagolfin
Copy link
Contributor

What problem are you having exactly? I agree this isn't a necessary feature and the generated file should not be compiled by default on all platforms, but that would require a different fix. If your problem is the one in #8018, I already fixed that.

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