| # Copyright 2025 The Pigweed Authors |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| # use this file except in compliance with the License. You may obtain a copy of |
| # the License at |
| # |
| # https://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| # License for the specific language governing permissions and limitations under |
| # the License. |
| |
| load("@rules_python//python:defs.bzl", "py_library") |
| load("@rules_python//python:py_test.bzl", "py_test") |
| |
| package(default_visibility = ["//visibility:public"]) |
| |
| exports_files([ |
| "discovery_utils.py", |
| "discovery_utils_test.py", |
| "kconfig_gen_symbols.py", |
| "kconfig_gen_symbols_test.py", |
| "kconfig_gen_values.py", |
| "kconfig_gen_values_test.py", |
| "kconfig_utils.py", |
| "kconfig_utils_test.py", |
| "parse_test_metadata.py", |
| "parse_test_metadata_test.py", |
| "parse_sysbuild_metadata.py", |
| "parse_sysbuild_metadata_test.py", |
| "scan_modules.py", |
| "scan_modules_test.py", |
| "ztest_runner.py", |
| "ztest_runner_core.py", |
| "ztest_runner_test.py", |
| "zephyr_flash_utils.py", |
| "zephyr_flash_utils_test.py", |
| ]) |
| |
| py_library( |
| name = "discovery_utils", |
| srcs = ["discovery_utils.py"], |
| ) |
| |
| py_test( |
| name = "discovery_utils_test", |
| srcs = ["discovery_utils_test.py"], |
| imports = ["."], |
| deps = [":discovery_utils"], |
| ) |
| |
| py_library( |
| name = "kconfig_gen_symbols_lib", |
| srcs = ["kconfig_gen_symbols.py"], |
| deps = [ |
| ":kconfig_utils", |
| "@zephyr_bazel_pip_deps//pyyaml", |
| ], |
| ) |
| |
| py_test( |
| name = "kconfig_gen_symbols_test", |
| srcs = ["kconfig_gen_symbols_test.py"], |
| imports = ["."], |
| deps = [":kconfig_gen_symbols_lib"], |
| ) |
| |
| py_library( |
| name = "kconfig_gen_values_lib", |
| srcs = ["kconfig_gen_values.py"], |
| deps = [":kconfig_utils"], |
| ) |
| |
| py_test( |
| name = "kconfig_gen_values_test", |
| srcs = ["kconfig_gen_values_test.py"], |
| imports = ["."], |
| deps = [":kconfig_gen_values_lib"], |
| ) |
| |
| py_library( |
| name = "kconfig_utils", |
| srcs = ["kconfig_utils.py"], |
| ) |
| |
| py_test( |
| name = "kconfig_utils_test", |
| srcs = ["kconfig_utils_test.py"], |
| imports = ["."], |
| deps = [":kconfig_utils"], |
| ) |
| |
| py_library( |
| name = "parse_test_metadata_lib", |
| srcs = ["parse_test_metadata.py"], |
| ) |
| |
| py_test( |
| name = "parse_test_metadata_test", |
| srcs = ["parse_test_metadata_test.py"], |
| imports = ["."], |
| deps = [":parse_test_metadata_lib"], |
| ) |
| |
| py_library( |
| name = "parse_sysbuild_metadata_lib", |
| srcs = ["parse_sysbuild_metadata.py"], |
| deps = ["@zephyr_bazel_pip_deps//pyyaml"], |
| ) |
| |
| py_test( |
| name = "parse_sysbuild_metadata_test", |
| srcs = ["parse_sysbuild_metadata_test.py"], |
| imports = ["."], |
| deps = [":parse_sysbuild_metadata_lib"], |
| ) |
| |
| py_library( |
| name = "scan_modules_lib", |
| srcs = ["scan_modules.py"], |
| deps = ["@zephyr_bazel_pip_deps//pyyaml"], |
| ) |
| |
| py_test( |
| name = "scan_modules_test", |
| srcs = ["scan_modules_test.py"], |
| imports = ["."], |
| deps = [ |
| ":scan_modules_lib", |
| ], |
| ) |
| |
| py_library( |
| name = "ztest_runner_core", |
| srcs = ["ztest_runner_core.py"], |
| imports = ["."], |
| deps = [ |
| ":zephyr_flash_utils", |
| "@zephyr_bazel_pip_deps//pylink_square", |
| "@zephyr_bazel_pip_deps//pyserial", |
| "@zephyr_bazel_pip_deps//pyyaml", |
| ], |
| ) |
| |
| py_test( |
| name = "ztest_runner_core_test", |
| srcs = ["ztest_runner_core_test.py"], |
| imports = ["."], |
| deps = [":ztest_runner_core"], |
| ) |
| |
| py_library( |
| name = "ztest_runner", |
| srcs = ["ztest_runner.py"], |
| deps = [ |
| ":zephyr_flash_utils", |
| ":ztest_runner_core", |
| "@rules_python//python/runfiles", |
| ], |
| ) |
| |
| py_test( |
| name = "ztest_runner_test", |
| srcs = ["ztest_runner_test.py"], |
| imports = ["."], |
| deps = [ |
| ":ztest_runner", |
| ], |
| ) |
| |
| py_library( |
| name = "zephyr_flash_utils", |
| srcs = ["zephyr_flash_utils.py"], |
| data = [ |
| "@zephyr//scripts:west_runners_scripts", |
| ], |
| deps = [ |
| "@rules_python//python/runfiles", |
| "@zephyr_bazel_pip_deps//pylink_square", |
| "@zephyr_bazel_pip_deps//pyserial", |
| "@zephyr_bazel_pip_deps//pyyaml", |
| ], |
| ) |
| |
| py_test( |
| name = "zephyr_flash_utils_test", |
| srcs = ["zephyr_flash_utils_test.py"], |
| imports = ["."], |
| deps = [ |
| ":zephyr_flash_utils", |
| ], |
| ) |
| |
| py_binary( |
| name = "zephyr_flash_utils_bin", |
| srcs = ["zephyr_flash_utils.py"], |
| data = [ |
| "@zephyr//scripts:west_runners_scripts", |
| ], |
| main = "zephyr_flash_utils.py", |
| deps = [ |
| "@rules_python//python/runfiles", |
| "@zephyr_bazel_pip_deps//pylink_square", |
| "@zephyr_bazel_pip_deps//pyserial", |
| "@zephyr_bazel_pip_deps//pyyaml", |
| ], |
| ) |