catch_discover_tests fails for Emscripten/WASM tests since v3.16.0
Maintainer thường phản hồi trong vòng 2 ngày
@nafiurahman00 đang làm issue này rồi.
Từ ngày 19/11/2026.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cmake, cpp, node.js, wasm
- Lĩnh vực
- build-system, testing
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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)
- Ngôn ngữ chính
- C++
- Star
- 21.6k
- Fork
- 3.4k
- Merge trung bình
- 3 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của catchorg/Catch2
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 2 ngày
-
catch_discover_tests passes all EXTRA_ARGS as one argumentCó thể đã có người làm @CyberKun đã nhận 11 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
catchorg/Catch2#3239 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Not seeing some error messages from fakeit in jetbrains riderCó thể đã có người làm @Amanpal9 đã nhận 21 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
catchorg/Catch2#3228 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Commit `b710039` breaks tests with overloaded `operator==`Có thể đã có người làm @michaelbawuah đã nhận 45 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 75/100
catchorg/Catch2#3221 · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của catchorg/Catch2
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
cp-algorithms/cp-algorithms#1774 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
telefonicaid/fiware-orion#4836 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
nixd exits at startup when its parent process belongs to another userCó thể đã có người làm @conao3 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
nix-community/nixd#930 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
refactor topic-ui topic-weather
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Command-Install Needs-Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
microsoft/winget-cli#6718 ·
Maintainer thường phản hồi trong vòng 2 ngày