You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running bazel test it creates the TEST_PREMATURE_EXIT_FILE which contains an absolute path to a file in a writable directory.
If a test binary creates that file, then removes it on a successful exit it allows the test runner to understand when a test binary has been aggressively aborted.
Additional Context
In order to catch early exit, a test may create a file at the path specified by TEST_PREMATURE_EXIT_FILE upon start and remove it upon exit. If Bazel sees the file when the test finishes, it will assume that the test exited prematurely and mark it as having failed.
The target path will be limited to target an existing directory. Creating and removing an empty file is easy-enough in C++14, but messing around with directories needs C++17's filesystem.
Activity
horenmar commentedon Aug 21, 2025
The target path will be limited to target an existing directory. Creating and removing an empty file is easy-enough in C++14, but messing around with directories needs C++17's filesystem.
Support Bazel's TEST_PREMATURE_EXIT_FILE and add it to CLI as well