Skip to content

Build both coverage and non-coverage tester binaries in CI#56538

Closed
rubennorte wants to merge 1 commit intofacebook:mainfrom
rubennorte:export-D101819861
Closed

Build both coverage and non-coverage tester binaries in CI#56538
rubennorte wants to merge 1 commit intofacebook:mainfrom
rubennorte:export-D101819861

Conversation

@rubennorte
Copy link
Copy Markdown
Contributor

Summary:
The Fantom Jest globalSetup builds the fantom-tester native binaries
upfront, using globalConfig.collectCoverage to decide whether to build
the -coverage flavor.

However, runner/coverageUtils.js's shouldCollectCoverage() returns
false for some tests even when globalConfig.collectCoverage is true:

  • All benchmarks (filename matches *Benchmark-itest.*)
  • Tests with the fantom_disable_coverage pragma

In CI coverage runs, those tests resolve their tester binary path with
enableCoverage=false (e.g. fantom-tester-statichermesstable-opt),
but globalSetup only built the -coverage variants, so spawn fails
with ENOENT and the test fails with an empty stdout/stderr and exit
code -2.

When enableCoverage is true, also build the non-coverage tester
variants so coverage-opt-out tests can find their binary.

Changelog: [Internal]

Differential Revision: D101819861

Summary:
The Fantom Jest `globalSetup` builds the `fantom-tester` native binaries
upfront, using `globalConfig.collectCoverage` to decide whether to build
the `-coverage` flavor.

However, `runner/coverageUtils.js`'s `shouldCollectCoverage()` returns
`false` for some tests even when `globalConfig.collectCoverage` is true:

- All benchmarks (filename matches `*Benchmark-itest.*`)
- Tests with the `fantom_disable_coverage` pragma

In CI coverage runs, those tests resolve their tester binary path with
`enableCoverage=false` (e.g. `fantom-tester-statichermesstable-opt`),
but `globalSetup` only built the `-coverage` variants, so spawn fails
with `ENOENT` and the test fails with an empty stdout/stderr and exit
code `-2`.

When `enableCoverage` is true, also build the non-coverage tester
variants so coverage-opt-out tests can find their binary.

Changelog: [Internal]

Differential Revision: D101819861
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 21, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Apr 21, 2026

@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D101819861.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @rubennorte in dbd3255

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Apr 21, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Apr 21, 2026

This pull request has been merged in dbd3255.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants