Skip to content

Commit fabce1e

Browse files
raghav-nexthopmeta-codesync[bot]
authored andcommitted
Add CMake test infrastructure for FBOSS Image Builder
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` Integrate distro_cli Python unit tests into the FBOSS CMake build system to enable automated testing in CI/CD pipelines. - Add FbossImageDistroCliTests.cmake to discover and register Python unit tests - Configure test discovery for distro_cli modules (builder, cmds, lib, tools) - Update root CMakeLists.txt to include distro_cli test suite - Enable distro_cli tests in GitHub Actions workflow - Update distro_cli README with build and test instructions The CMake configuration automatically discovers all *_test.py files and registers them as CTest targets, allowing tests to run via 'ctest' or 'make test'. X-link: facebook/fboss#797 Reviewed By: KevinYakar Differential Revision: D91709321 Pulled By: kevin645 fbshipit-source-id: eee2c3541b503d88e46b5eba36dc2ef84fd80bfa
1 parent 0f86d80 commit fabce1e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

build/fbcode_builder/CMake/FBPythonBinary.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ function(add_fb_python_executable TARGET)
158158
# CMake doesn't really seem to like having a directory specified as an
159159
# output; specify the __main__.py file as the output instead.
160160
set(zipapp_output_file "${zipapp_output}/__main__.py")
161+
# Update output_file to match zipapp_output_file for dir type
162+
set(output_file "${zipapp_output_file}")
161163
list(APPEND
162164
extra_cmd_params
163165
COMMAND "${CMAKE_COMMAND}" -E remove_directory "${zipapp_output}"

0 commit comments

Comments
 (0)