catch_discover_tests fails for Emscripten/WASM tests since v3.16.0
メンテナーはふだん 2 日以内に返信
@nafiurahman00 がすでに取り組んでいます。
2026年11月19日 から。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- cmake, cpp, node.js, wasm
- 領域
- build-system, testing
調査の方向性
Start with extras/CatchAddTests.cmake, especially the test listing logic around the temporary --out file, and compare it with the earlier stdout-based behavior mentioned in the issue. Reproduce using an Emscripten-built test executable registered with catch_discover_tests() and run ctest. Done means discovery succeeds when the executor cannot write to the host filesystem while preserving the existing discovery behavior.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
After updating from Catch2 3.13.0 to 3.16.1, catch_discover_tests() fails for our WebAssembly test executables built with Emscripten and run via Node.js (CMAKE_CROSSCOMPILING_EMULATOR set by the Emscripten toolchain):
Error when creating reporter: Unable to open file: '/home/conan/p/b/vcdb150102452536/b/cmake-build/RelWithDebInfo/source/vcd/test/Catch2-test-listing.Y01TSK3K.json'
CMake Error at /home/conan/p/catch47fa9efe01a8b/p/lib/cmake/Catch2/CatchAddTests.cmake:307 (message):
Error listing tests from executable
'/home/conan/p/b/vcdb150102452536/b/cmake-build/RelWithDebInfo/bin/vcd-test.js':
Result: 6
Output:
I think this was introduced by 9ec44dd62 (fix for #3162), which makes the test executable write the listing into a temp file via --out instead of reading stdout:
https://github.com/catchorg/Catch2/blob/v3.16.1/extras/CatchAddTests.cmake#L296-L304
An Emscripten executable only sees its virtual in-memory filesystem by default, so it cannot write to the path on the host. Stdout is forwarded by Node, which is why it worked before.
Expected behavior
Test discovery works with executors that don't share the host filesystem, like it did up to 3.15.x. Maybe a fallback to stdout or an option to opt out of the temp file?
Reproduction steps
Any test executable built with the Emscripten toolchain and registered with catch_discover_tests(), then run ctest.
Platform information:
- OS: Linux (Ubuntu), target wasm64
- Compiler+version: Emscripten 5.0.7, Node.js 24.18.0, CMake 4.3.2
- Catch version: v3.16.1 (works with v3.13.0)
- 主要言語
- C++
- スター
- 21.6k
- フォーク
- 3.4k
- 平均マージ
- 3日 12時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
catchorg/Catch2 のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 2 日以内に返信
-
catch_discover_tests passes all EXTRA_ARGS as one argument対応中かも @CyberKun が 11 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
catchorg/Catch2#3239 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Not seeing some error messages from fakeit in jetbrains rider対応中かも @Amanpal9 が 21 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
catchorg/Catch2#3228 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 2 日以内に返信
-
Commit `b710039` breaks tests with overloaded `operator==`対応中かも @michaelbawuah が 45 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 75/100
catchorg/Catch2#3221 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
catchorg/Catch2 の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
cp-algorithms/cp-algorithms#1774 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
telefonicaid/fiware-orion#4836 ·
メンテナーはふだん 1 日以内に返信
-
nixd exits at startup when its parent process belongs to another user対応中かも @conao3 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nix-community/nixd#930 ·
メンテナーはふだん 2 日以内に返信
-
refactor topic-ui topic-weather
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Command-Install Needs-Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
microsoft/winget-cli#6718 ·
メンテナーはふだん 2 日以内に返信