-
Notifications
You must be signed in to change notification settings - Fork 374
[Nexthop] enable fboss2 CLI tests in the OSS build #628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b8c8a5d to
453d3f5
Compare
|
@benoit-nexthop : can you add a new github action for running the fboss cli unit tests? |
453d3f5 to
3e48dd8
Compare
I added a new workflow in |
3b80ae7 to
144ac03
Compare
4e6ff09 to
a6aa99a
Compare
a6aa99a to
e3309e9
Compare
02bd96b to
6f663d1
Compare
|
@joseph5wu has imported this pull request. If you are a Meta employee, you can view this in D89410954. |
6f663d1 to
3bc5b06
Compare
|
@benoit-nexthop has updated the pull request. You must reimport the pull request before landing. |
3bc5b06 to
a1855ea
Compare
|
@benoit-nexthop has updated the pull request. You must reimport the pull request before landing. |
…ly the clang-format Summary: When helping Benoit from Nexthop to import PR: #628, I hit lots of clang-format issue from our phabricator: {F1984269569} This is due to the .clang-format only exist in github:fboss/fboss directory but not in github:fboss/common As we ship our fbcode fboss to github, we split the two folder as below https://www.internalfb.com/code/fbsource//fbcode/opensource/fbcode_builder/manifests/fboss?lines=48-51 Therefore, to make sure we honor the same clang-format, I think we should just move the current fboss/.clang-format to github/ in fbcode, as github/ will be the root directory in github. Besides, this .clang-format is mainly used for github formatting, we don't need this for our internal. The first diff to introduce this .clang-format is from D62764920 Reviewed By: kevin645 Differential Revision: D89426180 fbshipit-source-id: be37e6f32e7cb29ab8cb277e9cc8958ab75113ca
Tests using the mocked agent connection would often incur a 5-7 second delay because of the default Thrift configuration. By being more aggressive we can speed up the tests significantly. The 25 unit tests now take about 20-22s to complete (I’ve seen as low as 11s) vs 125-135s before (testing on Intel Xeon Silver 4309Y @ 2.80GHz).
a1855ea to
b66e380
Compare
|
@benoit-nexthop has updated the pull request. You must reimport the pull request before landing. |
Summary: **Pre-submission checklist** - [x] 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` - [x] `pre-commit run` The `fboss2` CLI has a number of unit tests, however none of them are being built/run in the OSS build. Turn the CLI into a library in the cmake build, just like how it’s done in the Buck build, and add a new cmake file for the unit tests that leverages this library. Various unit tests were including `nettools/common/TestUtils.h`, which is not open source, however they generally didn’t need that header and only needed a header from thrift from the most part. Some simple stubs were incomplete. The BGP server is taken out when building with `IS_OSS`. This change tries to keep the OSS build as close as possible to the internal build, with minimal usage of `#ifdef`s. X-link: facebook/fboss#628 Reviewed By: shiva-menta Differential Revision: D89410954 Pulled By: joseph5wu fbshipit-source-id: ee163fdba31b2a0d6768cd927681daba27d4c303
|
@joseph5wu merged this pull request in 4843538. |
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit installpre-commit runSummary
The
fboss2CLI has a number of unit tests, however none of them are being built/run in the OSS build. Turn the CLI into a library in the cmake build, just like how it’s done in the Buck build, and add a new cmake file for the unit tests that leverages this library.Various unit tests were including
nettools/common/TestUtils.h, which is not open source, however they generally didn’t need that header and only needed a header from thrift from the most part.Some simple stubs were incomplete. The BGP server is taken out when building with
IS_OSS. This change tries to keep the OSS build as close as possible to the internal build, with minimal usage of#ifdefs.Test Plan
This PR is only enabling new existing unit tests in the OSS build.