From 2d9d16656a97d0e295606a9977e9767b279c2c3e Mon Sep 17 00:00:00 2001 From: Dragan Bjedov Date: Thu, 28 Aug 2025 16:34:05 +0200 Subject: [PATCH 1/2] Fixed BUILD files --- MODULE.bazel | 7 +++++++ deps/dlt_daemon.BUILD | 2 ++ deps/python_dlt.BUILD | 2 ++ itf/plugins/BUILD | 12 ++++++++++++ itf/plugins/base/BUILD | 2 ++ itf/plugins/base/os/BUILD | 2 ++ itf/plugins/base/target/BUILD | 2 ++ itf/plugins/base/target/config/BUILD | 2 ++ itf/plugins/base/target/processors/BUILD | 2 ++ itf/plugins/base/test/BUILD | 2 ++ itf/plugins/com/BUILD | 2 ++ itf/plugins/dlt/BUILD | 1 + itf/plugins/utils/BUILD | 2 ++ itf/plugins/utils/process/BUILD | 2 ++ 14 files changed, 42 insertions(+) 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..f1e07ca 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 = [ 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/test/BUILD index 63087be..451d401 100644 --- a/itf/plugins/base/test/BUILD +++ b/itf/plugins/base/test/BUILD @@ -10,6 +10,8 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* +load("@rules_python//python:defs.bzl", "py_library") + py_library( name = "test", srcs = [ 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 = [ From 7bad2088185f9846a7132b0a09c73ff6cac9796b Mon Sep 17 00:00:00 2001 From: Dragan Bjedov Date: Thu, 28 Aug 2025 16:39:50 +0200 Subject: [PATCH 2/2] Renamed itf/plugins/base/test to itf/plugins/base/utils --- itf/plugins/base/BUILD | 2 +- itf/plugins/base/base_plugin.py | 2 +- itf/plugins/base/{test => utils}/BUILD | 7 +++++-- itf/plugins/base/{test => utils}/__init__.py | 0 itf/plugins/base/{test/utils.py => utils/exec_utils.py} | 0 5 files changed, 7 insertions(+), 4 deletions(-) rename itf/plugins/base/{test => utils}/BUILD (88%) rename itf/plugins/base/{test => utils}/__init__.py (100%) rename itf/plugins/base/{test/utils.py => utils/exec_utils.py} (100%) diff --git a/itf/plugins/base/BUILD b/itf/plugins/base/BUILD index f1e07ca..bf9a598 100644 --- a/itf/plugins/base/BUILD +++ b/itf/plugins/base/BUILD @@ -24,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/test/BUILD b/itf/plugins/base/utils/BUILD similarity index 88% rename from itf/plugins/base/test/BUILD rename to itf/plugins/base/utils/BUILD index 451d401..5426f54 100644 --- a/itf/plugins/base/test/BUILD +++ b/itf/plugins/base/utils/BUILD @@ -13,11 +13,14 @@ 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