Proposal: Translating Python Tester Script to C for Enhanced Stack Trace Capturing in Meson Build
Context
In our current Meson Build setup for c3c, we utilize tester.py for running tests. This script launches a separate Python executable to execute the tests, resulting in an isolated stack trace and execution environment.
Issue
This separation poses a challenge in effectively capturing and analyzing stack traces, especially when a test case fails during compilation. Typically, in a Meson build, if a Python executable wasn't required to run the test cases, we could obtain a stack trace from a failed test case using a command like:
meson test -C build --gdb "Test Suite - casts - cast_expr"
However, due to the nature of the Python script execution, this approach is not feasible.
Proposal
To enhance our debugging capabilities, particularly for capturing useful stack traces during compilation failures in unit tests, I propose we discuss the possibility of translating the existing Python script (tester.py) to a C3C implementation. This transition would potentially allow us to integrate more closely with the Meson build environment and leverage its native testing and debugging tools, such as gdb.
Benefits
- Improved stack trace capturing for compilation failures in tests.
- Tighter integration with Meson's native testing and debugging features.
- Potentially increased performance and efficiency in test execution.
I'm looking forward to discussing this possibility further and hearing any thoughts or concerns about this proposed transition.
Some work in this direction is already done. The Python implementation will be replaced with a C3 one.