Skip to content

Make C++ tests in testsuite link-tests only#161

Merged
dra27 merged 2 commits intoMisterDA:cxx-api-compatfrom
dra27:cxx-api-compat-patches
Jan 29, 2026
Merged

Make C++ tests in testsuite link-tests only#161
dra27 merged 2 commits intoMisterDA:cxx-api-compatfrom
dra27:cxx-api-compat-patches

Conversation

@dra27
Copy link

@dra27 dra27 commented Jan 26, 2026

I've got some work-in-progress changes in dra27@0363e41 to test the runtime headers as part of the development-mode build, instead of in the testsuite (it tests each header individually, in both C and C++ pedantic mode). A bit like the config_main and config_boot test module (which catches forgetting to keep utils/config.fixed.ml and utils/config.generated.ml.in in sync), it has the benefit of catching these errors during development, which means they might get caught even before a PR is opened, or at least more quickly as mostly it means the build fails, rather than the testsuite. I've tested that commit on 4 reverts of the various fixes in: dra27#265, dra27#266, dra27#267 and dra27#268.

If we end up doing that, my suggestion is to keep both of the C++ tests in the testsuite, but use them as linking tests... i.e. I think your existing sockaddr compat test is obviously still worth running in C++ mode and I think it's worth having a general linking test for a C++ program testing both the bytecode and native linking.

I wasn't expecting it to end up this way, but at the moment the SARIF stuff does appear avoidable for now - but that led to wanting to share cxx.sh between both C++ tests, so I've proposed adding the slightly weird outputobj variable to ocamltest.

@dra27 dra27 marked this pull request as ready for review January 27, 2026 19:29
@dra27 dra27 merged commit ca25a86 into MisterDA:cxx-api-compat Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant