Skip to content

Conversation

@benoit-nexthop
Copy link
Contributor

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run

Summary

When building only a specific cmake target to save time, getdeps removes
the "built marker” under $builddir/installed/fboss/.built-by-getdeps,
which makes it impossible to subsequently run the unit tests as without
this file getdeps bails out with project fboss has not been built.
What’s more, because of a missing return the exit code was 0, which
was confusing.
This fix ensures that the return code is propagated properly and also
improves the cmake test runner to automatically detect missing
executables and build them on the fly. This will not rebuild the test
binaries if they've already been built and are merely stale (because the
source code has changed) but that was already the prior behavior. At
least now it's possible to rebuild a single cmake test target and re-run
the tests in one shot.

Test Plan

Not needed.

When building only a specific cmake target to save time, getdeps removes
the "built marker” under `$builddir/installed/fboss/.built-by-getdeps`,
which makes it impossible to subsequently run the unit tests as  without
this file getdeps bails out with `project fboss has not been built`.
What’s more, because of a missing `return` the exit code was 0, which
was confusing.
This fix ensures that the return code is propagated properly and also
improves the cmake test runner to automatically detect missing
executables and build them on the fly. This will not rebuild the test
binaries if they've already been built and are merely stale (because the
source code has changed) but that was already the prior behavior. At
least now it's possible to rebuild a single cmake test target and re-run
the tests in one shot.
@meta-cla meta-cla bot added the CLA Signed label Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant