Skip to content

catch_discover_tests reads the listing from stdout under Emscripten - #3242

Open
nafiurahman00 wants to merge 1 commit into
catchorg:develfrom
nafiurahman00:discover-tests-emscripten-stdout
Open

nafiurahman00 wants to merge 1 commit into
catchorg:develfrom
nafiurahman00:discover-tests-emscripten-stdout

Conversation

@nafiurahman00

Copy link
Copy Markdown

Description

I went with the first option from #3241. When CMAKE_SYSTEM_NAME is Emscripten, discovery asks for the listing on stdout like it did before 3.16, so the temp file doesn't get lost in node's virtual filesystem. It doesn't change anything for other platforms.

A small heads-up I would like to give is, it has to be %stdout, not %stdout%. The second one gets rejected as an unknown stream, so discovery still fails with it.

I checked it with emsdk 7.0.0 on a small two-test project. Before this, POST_BUILD broke the build and PRE_TEST failed in ctest. Now both work. The normal test suite passes still. CI has no Emscripten job, so there's no new test here. If you'd rather have a general option than special-casing Emscripten, I can switch it.

GitHub Issues

Closes #3241

Since 3.16 the test listing is written to a temp file and read back.
Emscripten binaries run under node with a virtual filesystem, so the
file never shows up on disk and discovery fails. When targeting
Emscripten, ask for the listing on stdout instead.

Closes catchorg#3241
@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.39%. Comparing base (36c1bc3) to head (57a6736).

Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #3242      +/-   ##
==========================================
- Coverage   91.43%   91.39%   -0.03%     
==========================================
  Files         205      205              
  Lines        9108     9108              
==========================================
- Hits         8327     8324       -3     
- Misses        781      784       +3     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

catch_discover_tests fails for Emscripten/WASM tests since v3.16.0

1 participant