Tests in test/cases/translate_c and test/cases/run_translated_c aren't run when using `test-translate-c` and `test-run-translated-c`
Zig Version
0.12.0-dev.1769+bf5ab5451
Steps to Reproduce and Observed Behavior
When I add new translate-c/run-translated-c tests in the appropriate folder, the test isn't run when using the command zig build test-translate-c or zig build test-run-translated-c. However, I can see that the test fails when I run the larger test-suite.
Reproducible Example
Add the following test to test/cases/run_translated_c/
failing_test.c:
int main() {
return 1;
}
// run-translated-c
// c_frontend=clang
// link_libc=true
Command output:
> stage4/bin/zig build test-translate-c test-run-translated-c # Everything passes
> stage4/bin/zig build test -Denable-llvm -Dskip-release -Dskip-non-native
run-translated-c failing_test run: error: the following command exited with code 1 (expected exited with code 0):
/home/february/projects/zig/zig-cache/o/ac2288d51cb8981d4c97f1457a1d99b5/translated_c
>
A similar test can be done with test-translate-c.
Expected Behavior
test-translate-c and test-run-translated-c should run the tests that are in the test folders.
This is happening because the translate-c/run-translated-c tests are being added in tests.addCases test harness rather than in tests.addTranslateCTests / tests.addRunTranslatedCTests. This also means that the -Dskip-run-translated-c option doesn't skip the tests in test/cases/run_translated_c/.