Skip to content

Conversation

@raghav-nexthop
Copy link

@raghav-nexthop raghav-nexthop commented Jan 9, 2026

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

Add cmake/FbossImageDistroCliTests.cmake to integrate distro_cli unit tests into the CMake build system:

  • Uses add_fb_python_unittest() for automatic test discovery
  • Integrates with CTest for individual test execution
  • Copies test data to build directory
  • Sets PYTHONPATH for proper imports
  • Update README.md with CMake test instructions

This is a second in the series. The previous one is #735 The next one is #793

Test Plan

Unit tests:

$ cd fboss-image
$ PYTHONPATH=distro_cli python3 -m pytest distro_cli/tests/cli_test.py -v
=============================================================== 14 passed in 0.03s ===============================================================

Summary:

Here an RPM specfile and surrounding machinery is added to build an
FBOSS-compatible Linux kernel from vanilla Linux sources which is
compatible with CentOS. On top of this reference configuration,
additional local changes from `fboss-local-overrides.yaml` are applied
prior to building.

To use, inside an FBOSS build container, run:

    # fboss-image/kernel/scripts/build_kernel.sh 6.4.3 out
    ...
    Kernel RPM build complete!
    Output files:
    out/x86_64/kernel-modules-6.4.3-1.fboss.el9.x86_64.rpm
    out/x86_64/kernel-headers-6.4.3-1.fboss.el9.x86_64.rpm
    out/x86_64/kernel-core-6.4.3-1.fboss.el9.x86_64.rpm
    out/x86_64/kernel-devel-6.4.3-1.fboss.el9.x86_64.rpm
    out/BUILD/linux-6.4.3/kernel/config_data.gz
    out/SRPMS/kernel-6.4.3-1.fboss.el9.src.rpm
    out/kernel-6.4.3.rpms.tar.gz
    out/kernel-6.4.3-1.fboss.el9.src.rpm
    out/RPMS/x86_64/kernel-modules-6.4.3-1.fboss.el9.x86_64.rpm
    out/RPMS/x86_64/kernel-headers-6.4.3-1.fboss.el9.x86_64.rpm
    out/RPMS/x86_64/kernel-core-6.4.3-1.fboss.el9.x86_64.rpm
    out/RPMS/x86_64/kernel-devel-6.4.3-1.fboss.el9.x86_64.rpm
    # ls fboss-image/kernel/dist/build-6.4.3/out/
    kernel-6.4.3-1.fboss.el9.src.rpm  kernel-core-6.4.3-1.fboss.el9.x86_64.rpm   kernel-headers-6.4.3-1.fboss.el9.x86_64.rpm
    kernel-6.4.3.rpms.tar.gz          kernel-devel-6.4.3-1.fboss.el9.x86_64.rpm  kernel-modules-6.4.3-1.fboss.el9.x86_64.rpm
@meta-cla meta-cla bot added the CLA Signed label Jan 9, 2026
@raghav-nexthop raghav-nexthop changed the title [Nexthop] CLI Skeleton for FBOSS Image Builder [Nexthop] Integrate distro_cli unit tests into CMake Jan 9, 2026
@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-skeleton branch from 0277a47 to 3a4da29 Compare January 9, 2026 03:15
raghav-nexthop added a commit to nexthop-ai/fboss that referenced this pull request Jan 9, 2026
Add Docker container and image management:
- Docker container wrapper with exec/run capabilities
- Docker image wrapper with build/pull/tag operations
- Comprehensive unit tests for container and image operations

Dependencies: Uses constants from PR facebook#792

Test Plan:
- All tests passing: 37/37 tests pass
- Files added: 6 files, +572 lines
- Unit tests: docker_test.py (1 test), docker_image_test.py (4 tests)
- Docker image builds successfully (3.61GB, 52 build steps)
raghav-nexthop added a commit to nexthop-ai/fboss that referenced this pull request Jan 9, 2026
Add Docker container and image management:
- Docker container wrapper with exec/run capabilities
- Docker image wrapper with build/pull/tag operations
- Build script for FBOSS builder Docker image
- Comprehensive unit tests for Docker operations

Dependencies: Uses constants from PR facebook#792

Test Plan:
- All unit tests pass (docker_test.py, docker_image_test.py)
- Docker image builds successfully with all build dependencies
raghav-nexthop added a commit to nexthop-ai/fboss that referenced this pull request Jan 9, 2026
Add Docker container and image management:
- Docker container wrapper with exec/run capabilities
- Docker image wrapper with build/pull/tag operations
- Build script for FBOSS builder Docker image
- Comprehensive unit tests for Docker operations

Dependencies: Uses constants from PR facebook#792

Test Plan:
- All unit tests pass (docker_test.py, docker_image_test.py)
- Docker image builds successfully with all build dependencies
Add CMake configuration and CI workflow for FBOSS Image Builder:
- CMake test configuration for distro_cli unit tests
- GitHub Actions workflow for automated testing
- README documentation for the distro_cli tool

Test Plan:
- CMake configuration tested with pytest integration
- CI workflow validates on pull requests
@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-skeleton branch from 3a4da29 to 613ae64 Compare January 9, 2026 04:27
@raghav-nexthop
Copy link
Author

New PR will be created.

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