diff --git a/MODULE.bazel b/MODULE.bazel index cf30339..b8723e8 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -65,6 +65,13 @@ git_override( remote = "https://github.com/ltekieli/rules_lint.git", ) +############################################################################### +# +# C++ rules +# +############################################################################### +bazel_dep(name = "rules_cc", version = "0.1.1") + ################################################################################ # # Load DLT dependencies diff --git a/deps/dlt_daemon.BUILD b/deps/dlt_daemon.BUILD index 78ab9a6..1e5e4a9 100644 --- a/deps/dlt_daemon.BUILD +++ b/deps/dlt_daemon.BUILD @@ -10,6 +10,8 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* +load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library") + filegroup( name = "fg_dlt_headers", srcs = glob([ diff --git a/deps/python_dlt.BUILD b/deps/python_dlt.BUILD index dfb7107..88cd612 100644 --- a/deps/python_dlt.BUILD +++ b/deps/python_dlt.BUILD @@ -10,6 +10,8 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* +load("@rules_python//python:defs.bzl", "py_library") + py_library( name = "python_dlt", srcs = glob(["dlt/**/*.py"]), diff --git a/itf/plugins/BUILD b/itf/plugins/BUILD index fdcc1ce..248f24c 100644 --- a/itf/plugins/BUILD +++ b/itf/plugins/BUILD @@ -1,3 +1,15 @@ +# ******************************************************************************* +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* filegroup( name = "docker", srcs = ["docker.py"], diff --git a/itf/plugins/base/BUILD b/itf/plugins/base/BUILD index 49ae2aa..bf9a598 100644 --- a/itf/plugins/base/BUILD +++ b/itf/plugins/base/BUILD @@ -10,6 +10,8 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* +load("@rules_python//python:defs.bzl", "py_library") + py_library( name = "base", srcs = [ @@ -22,7 +24,7 @@ py_library( deps = [ "//itf/plugins/base/os", "//itf/plugins/base/target", - "//itf/plugins/base/test", + "//itf/plugins/base/utils", "//itf/plugins/utils", ], ) diff --git a/itf/plugins/base/base_plugin.py b/itf/plugins/base/base_plugin.py index 0f059f5..45c8b34 100644 --- a/itf/plugins/base/base_plugin.py +++ b/itf/plugins/base/base_plugin.py @@ -20,7 +20,7 @@ from itf.plugins.base.target.qemu_target import qemu_target from itf.plugins.base.target.qvp_target import qvp_target from itf.plugins.base.target.hw_target import hw_target -from itf.plugins.base.test.utils import pre_tests_phase, post_tests_phase +from itf.plugins.base.utils.exec_utils import pre_tests_phase, post_tests_phase from itf.plugins.utils import padder from itf.plugins.utils.bunch import Bunch diff --git a/itf/plugins/base/os/BUILD b/itf/plugins/base/os/BUILD index 2e92899..24f77e7 100644 --- a/itf/plugins/base/os/BUILD +++ b/itf/plugins/base/os/BUILD @@ -10,6 +10,8 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* +load("@rules_python//python:defs.bzl", "py_library") + py_library( name = "os", srcs = [ diff --git a/itf/plugins/base/target/BUILD b/itf/plugins/base/target/BUILD index aedac15..cf70f03 100644 --- a/itf/plugins/base/target/BUILD +++ b/itf/plugins/base/target/BUILD @@ -10,6 +10,8 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* +load("@rules_python//python:defs.bzl", "py_library") + py_library( name = "target", srcs = [ diff --git a/itf/plugins/base/target/config/BUILD b/itf/plugins/base/target/config/BUILD index c3b704e..a4fb786 100644 --- a/itf/plugins/base/target/config/BUILD +++ b/itf/plugins/base/target/config/BUILD @@ -10,6 +10,8 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* +load("@rules_python//python:defs.bzl", "py_library") + py_library( name = "config", srcs = [ diff --git a/itf/plugins/base/target/processors/BUILD b/itf/plugins/base/target/processors/BUILD index 5a0d02e..4317766 100644 --- a/itf/plugins/base/target/processors/BUILD +++ b/itf/plugins/base/target/processors/BUILD @@ -10,6 +10,8 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* +load("@rules_python//python:defs.bzl", "py_library") + py_library( name = "processors", srcs = [ diff --git a/itf/plugins/base/test/BUILD b/itf/plugins/base/utils/BUILD similarity index 82% rename from itf/plugins/base/test/BUILD rename to itf/plugins/base/utils/BUILD index 63087be..5426f54 100644 --- a/itf/plugins/base/test/BUILD +++ b/itf/plugins/base/utils/BUILD @@ -10,12 +10,17 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* +load("@rules_python//python:defs.bzl", "py_library") + py_library( - name = "test", + name = "utils", srcs = [ "__init__.py", - "utils.py", + "exec_utils.py", ], imports = ["."], visibility = ["//visibility:public"], + deps = [ + "//itf/plugins/com", + ], ) diff --git a/itf/plugins/base/test/__init__.py b/itf/plugins/base/utils/__init__.py similarity index 100% rename from itf/plugins/base/test/__init__.py rename to itf/plugins/base/utils/__init__.py diff --git a/itf/plugins/base/test/utils.py b/itf/plugins/base/utils/exec_utils.py similarity index 100% rename from itf/plugins/base/test/utils.py rename to itf/plugins/base/utils/exec_utils.py diff --git a/itf/plugins/com/BUILD b/itf/plugins/com/BUILD index 5ebd8b1..6654867 100644 --- a/itf/plugins/com/BUILD +++ b/itf/plugins/com/BUILD @@ -10,6 +10,8 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* +load("@rules_python//python:defs.bzl", "py_library") + py_library( name = "ssh", srcs = [ diff --git a/itf/plugins/dlt/BUILD b/itf/plugins/dlt/BUILD index c6c97d5..e7199b1 100644 --- a/itf/plugins/dlt/BUILD +++ b/itf/plugins/dlt/BUILD @@ -11,6 +11,7 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* load("//bazel/rules/as_host:rule.bzl", "as_host") +load("@rules_python//python:defs.bzl", "py_library") as_host( name = "dlt-receive_as_host", diff --git a/itf/plugins/utils/BUILD b/itf/plugins/utils/BUILD index 9f0eca9..0947b77 100644 --- a/itf/plugins/utils/BUILD +++ b/itf/plugins/utils/BUILD @@ -10,6 +10,8 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* +load("@rules_python//python:defs.bzl", "py_library") + py_library( name = "utils", srcs = [ diff --git a/itf/plugins/utils/process/BUILD b/itf/plugins/utils/process/BUILD index 89c8425..3809608 100644 --- a/itf/plugins/utils/process/BUILD +++ b/itf/plugins/utils/process/BUILD @@ -10,6 +10,8 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* +load("@rules_python//python:defs.bzl", "py_library") + py_library( name = "process", srcs = [