From e03226de088dcc64fc7962ab506f7325db0ccc22 Mon Sep 17 00:00:00 2001 From: Lukasz Tekieli Date: Wed, 11 Feb 2026 12:38:35 +0100 Subject: [PATCH] Make qemu a separate plugin with all its deps --- BUILD | 5 +- examples/examples/itf/BUILD | 6 +-- score/itf/core/base/BUILD | 34 ------------- score/itf/core/base/os/BUILD | 27 ---------- score/itf/core/base/target/BUILD | 31 ----------- score/itf/core/base/target/config/BUILD | 26 ---------- score/itf/core/base/target/processors/BUILD | 30 ----------- score/itf/core/base/utils/BUILD | 26 ---------- score/itf/core/com/BUILD | 10 ++-- score/itf/core/{utils => }/process/BUILD | 6 ++- score/itf/core/{base => process}/__init__.py | 0 score/itf/core/{utils => }/process/console.py | 0 .../{utils => }/process/process_wrapper.py | 2 +- score/itf/core/qemu/BUILD | 27 ---------- score/itf/core/utils/BUILD | 4 -- score/itf/core/utils/process/__init__.py | 12 ----- score/itf/plugins/dlt/BUILD | 1 + score/itf/plugins/dlt/dlt_receive.py | 2 +- score/itf/plugins/dlt/dlt_window.py | 2 +- score/itf/plugins/plugins.bzl | 6 +-- score/itf/plugins/qemu/BUILD | 51 +++++++++++++++++++ .../qemu/__init__.py} | 10 ++-- .../base/os => plugins/qemu/base}/__init__.py | 0 .../{core => plugins/qemu}/base/constants.py | 0 .../qemu/base/os}/__init__.py | 0 .../{core => plugins/qemu}/base/os/config.py | 0 .../qemu}/base/os/operating_system.py | 2 +- .../qemu/base/target}/__init__.py | 0 .../qemu}/base/target/base_target.py | 6 +-- .../qemu}/base/target/config/__init__.py | 0 .../base/target/config/base_processor.py | 0 .../qemu}/base/target/config/config.py | 6 +-- .../qemu}/base/target/config/ecu.py | 4 +- .../target/config/performance_processor.py | 2 +- .../base/target/config/safety_processor.py | 2 +- .../qemu/base/target/processors}/__init__.py | 0 .../base/target/processors/qemu_processor.py | 6 +-- .../target/processors/safety_processor.py | 6 +-- .../target/processors/target_processor.py | 4 +- .../qemu}/base/target/qemu_target.py | 10 ++-- .../qemu/base/utils}/__init__.py | 0 .../qemu}/base/utils/exec_utils.py | 2 +- score/itf/{core => plugins}/qemu/qemu.py | 0 .../{core => plugins}/qemu/qemu_process.py | 4 +- test/BUILD | 10 ++-- 45 files changed, 112 insertions(+), 270 deletions(-) delete mode 100644 score/itf/core/base/BUILD delete mode 100644 score/itf/core/base/os/BUILD delete mode 100644 score/itf/core/base/target/BUILD delete mode 100644 score/itf/core/base/target/config/BUILD delete mode 100644 score/itf/core/base/target/processors/BUILD delete mode 100644 score/itf/core/base/utils/BUILD rename score/itf/core/{utils => }/process/BUILD (88%) rename score/itf/core/{base => process}/__init__.py (100%) rename score/itf/core/{utils => }/process/console.py (100%) rename score/itf/core/{utils => }/process/process_wrapper.py (99%) delete mode 100644 score/itf/core/qemu/BUILD delete mode 100644 score/itf/core/utils/process/__init__.py create mode 100644 score/itf/plugins/qemu/BUILD rename score/itf/{core/base/base_plugin.py => plugins/qemu/__init__.py} (89%) rename score/itf/{core/base/os => plugins/qemu/base}/__init__.py (100%) rename score/itf/{core => plugins/qemu}/base/constants.py (100%) rename score/itf/{core/base/target => plugins/qemu/base/os}/__init__.py (100%) rename score/itf/{core => plugins/qemu}/base/os/config.py (100%) rename score/itf/{core => plugins/qemu}/base/os/operating_system.py (91%) rename score/itf/{core/base/target/processors => plugins/qemu/base/target}/__init__.py (100%) rename score/itf/{core => plugins/qemu}/base/target/base_target.py (92%) rename score/itf/{core => plugins/qemu}/base/target/config/__init__.py (100%) rename score/itf/{core => plugins/qemu}/base/target/config/base_processor.py (100%) rename score/itf/{core => plugins/qemu}/base/target/config/config.py (93%) rename score/itf/{core => plugins/qemu}/base/target/config/ecu.py (90%) rename score/itf/{core => plugins/qemu}/base/target/config/performance_processor.py (98%) rename score/itf/{core => plugins/qemu}/base/target/config/safety_processor.py (96%) rename score/itf/{core/base/utils => plugins/qemu/base/target/processors}/__init__.py (100%) rename score/itf/{core => plugins/qemu}/base/target/processors/qemu_processor.py (78%) rename score/itf/{core => plugins/qemu}/base/target/processors/safety_processor.py (77%) rename score/itf/{core => plugins/qemu}/base/target/processors/target_processor.py (96%) rename score/itf/{core => plugins/qemu}/base/target/qemu_target.py (81%) rename score/itf/{core/qemu => plugins/qemu/base/utils}/__init__.py (100%) rename score/itf/{core => plugins/qemu}/base/utils/exec_utils.py (97%) rename score/itf/{core => plugins}/qemu/qemu.py (100%) rename score/itf/{core => plugins}/qemu/qemu_process.py (94%) diff --git a/BUILD b/BUILD index f8744f2..f0ca3f9 100644 --- a/BUILD +++ b/BUILD @@ -30,9 +30,12 @@ py_library( srcs = [ "score/itf/__init__.py", ], - imports = ["."], visibility = ["//visibility:public"], deps = [ + "//score/itf/core/com", + "//score/itf/core/process", + "//score/itf/core/target", + "//score/itf/core/utils", "//score/itf/plugins:core", ], ) diff --git a/examples/examples/itf/BUILD b/examples/examples/itf/BUILD index 9f4209b..34ed816 100644 --- a/examples/examples/itf/BUILD +++ b/examples/examples/itf/BUILD @@ -11,7 +11,7 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* load("@score_itf//:defs.bzl", "py_itf_test") -load("@score_itf//score/itf/plugins:plugins.bzl", "base", "dlt", "docker") +load("@score_itf//score/itf/plugins:plugins.bzl", "dlt", "docker", "qemu") py_itf_test( name = "test_docker", @@ -58,7 +58,7 @@ py_itf_test( "@score_itf//test/resources:target_config", ], plugins = [ - base, + qemu, dlt, ], tags = [ @@ -81,7 +81,7 @@ py_itf_test( "@score_itf//test/resources:target_config", ], plugins = [ - base, + qemu, dlt, ], tags = [ diff --git a/score/itf/core/base/BUILD b/score/itf/core/base/BUILD deleted file mode 100644 index 927d49e..0000000 --- a/score/itf/core/base/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -# ******************************************************************************* -# 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 -# ******************************************************************************* -load("@itf_pip//:requirements.bzl", "requirement") -load("@rules_python//python:defs.bzl", "py_library") - -py_library( - name = "base", - srcs = [ - "__init__.py", - "base_plugin.py", - "constants.py", - ], - imports = ["."], - visibility = ["//visibility:public"], - deps = [ - "//score/itf/core/base/os", - "//score/itf/core/base/target", - "//score/itf/core/base/utils", - "//score/itf/core/utils", - requirement("typing-extensions"), - requirement("paramiko"), - requirement("netifaces"), - ], -) diff --git a/score/itf/core/base/os/BUILD b/score/itf/core/base/os/BUILD deleted file mode 100644 index c404a4e..0000000 --- a/score/itf/core/base/os/BUILD +++ /dev/null @@ -1,27 +0,0 @@ -# ******************************************************************************* -# 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 -# ******************************************************************************* -load("@rules_python//python:defs.bzl", "py_library") - -py_library( - name = "os", - srcs = [ - "__init__.py", - "config.py", - "operating_system.py", - ], - imports = ["."], - visibility = ["//visibility:public"], - deps = [ - "//score/itf/core/utils", - ], -) diff --git a/score/itf/core/base/target/BUILD b/score/itf/core/base/target/BUILD deleted file mode 100644 index 2a801ca..0000000 --- a/score/itf/core/base/target/BUILD +++ /dev/null @@ -1,31 +0,0 @@ -# ******************************************************************************* -# 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 -# ******************************************************************************* -load("@rules_python//python:defs.bzl", "py_library") - -py_library( - name = "target", - srcs = [ - "__init__.py", - "base_target.py", - "qemu_target.py", - ], - imports = ["."], - visibility = ["//visibility:public"], - deps = [ - "//score/itf/core/base/os", - "//score/itf/core/base/target/config", - "//score/itf/core/base/target/processors", - "//score/itf/core/qemu", - "//score/itf/plugins/dlt", - ], -) diff --git a/score/itf/core/base/target/config/BUILD b/score/itf/core/base/target/config/BUILD deleted file mode 100644 index 4d21dbe..0000000 --- a/score/itf/core/base/target/config/BUILD +++ /dev/null @@ -1,26 +0,0 @@ -# ******************************************************************************* -# 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 -# ******************************************************************************* -load("@rules_python//python:defs.bzl", "py_library") - -py_library( - name = "config", - srcs = [ - "__init__.py", - "base_processor.py", - "config.py", - "ecu.py", - "performance_processor.py", - ], - imports = ["."], - visibility = ["//visibility:public"], -) diff --git a/score/itf/core/base/target/processors/BUILD b/score/itf/core/base/target/processors/BUILD deleted file mode 100644 index 9e89e7a..0000000 --- a/score/itf/core/base/target/processors/BUILD +++ /dev/null @@ -1,30 +0,0 @@ -# ******************************************************************************* -# 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 -# ******************************************************************************* -load("@rules_python//python:defs.bzl", "py_library") - -py_library( - name = "processors", - srcs = [ - "__init__.py", - "qemu_processor.py", - "target_processor.py", - ], - imports = ["."], - visibility = ["//visibility:public"], - deps = [ - "//score/itf/core/base/os", - "//score/itf/core/base/target/config", - "//score/itf/core/com:ping", - "//score/itf/core/com:ssh", - ], -) diff --git a/score/itf/core/base/utils/BUILD b/score/itf/core/base/utils/BUILD deleted file mode 100644 index 9e8a9ab..0000000 --- a/score/itf/core/base/utils/BUILD +++ /dev/null @@ -1,26 +0,0 @@ -# ******************************************************************************* -# 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 -# ******************************************************************************* -load("@rules_python//python:defs.bzl", "py_library") - -py_library( - name = "utils", - srcs = [ - "__init__.py", - "exec_utils.py", - ], - imports = ["."], - visibility = ["//visibility:public"], - deps = [ - "//score/itf/core/com", - ], -) diff --git a/score/itf/core/com/BUILD b/score/itf/core/com/BUILD index 6654867..13704fc 100644 --- a/score/itf/core/com/BUILD +++ b/score/itf/core/com/BUILD @@ -10,6 +10,8 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* + +load("@itf_pip//:requirements.bzl", "requirement") load("@rules_python//python:defs.bzl", "py_library") py_library( @@ -20,8 +22,9 @@ py_library( "ssh.py", "ssh_command.py", ], - imports = ["."], - visibility = ["//visibility:public"], + deps = [ + requirement("paramiko"), + ], ) py_library( @@ -30,13 +33,10 @@ py_library( "__init__.py", "ping.py", ], - imports = ["."], - visibility = ["//visibility:public"], ) py_library( name = "com", - imports = ["."], visibility = ["//visibility:public"], deps = [ ":ping", diff --git a/score/itf/core/utils/process/BUILD b/score/itf/core/process/BUILD similarity index 88% rename from score/itf/core/utils/process/BUILD rename to score/itf/core/process/BUILD index 3809608..e202a8a 100644 --- a/score/itf/core/utils/process/BUILD +++ b/score/itf/core/process/BUILD @@ -10,6 +10,8 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* + +load("@itf_pip//:requirements.bzl", "requirement") load("@rules_python//python:defs.bzl", "py_library") py_library( @@ -19,6 +21,8 @@ py_library( "console.py", "process_wrapper.py", ], - imports = ["."], visibility = ["//visibility:public"], + deps = [ + requirement("pytest"), + ], ) diff --git a/score/itf/core/base/__init__.py b/score/itf/core/process/__init__.py similarity index 100% rename from score/itf/core/base/__init__.py rename to score/itf/core/process/__init__.py diff --git a/score/itf/core/utils/process/console.py b/score/itf/core/process/console.py similarity index 100% rename from score/itf/core/utils/process/console.py rename to score/itf/core/process/console.py diff --git a/score/itf/core/utils/process/process_wrapper.py b/score/itf/core/process/process_wrapper.py similarity index 99% rename from score/itf/core/utils/process/process_wrapper.py rename to score/itf/core/process/process_wrapper.py index e568d7c..ef9244f 100644 --- a/score/itf/core/utils/process/process_wrapper.py +++ b/score/itf/core/process/process_wrapper.py @@ -18,7 +18,7 @@ import pytest from subprocess import TimeoutExpired -from score.itf.core.utils.process.console import PipeConsole +from score.itf.core.process.console import PipeConsole logger = logging.getLogger(__name__) diff --git a/score/itf/core/qemu/BUILD b/score/itf/core/qemu/BUILD deleted file mode 100644 index 7d929a8..0000000 --- a/score/itf/core/qemu/BUILD +++ /dev/null @@ -1,27 +0,0 @@ -# ******************************************************************************* -# 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 -# ******************************************************************************* -load("@rules_python//python:defs.bzl", "py_library") - -py_library( - name = "qemu", - srcs = [ - "__init__.py", - "qemu.py", - "qemu_process.py", - ], - imports = ["."], - visibility = ["//visibility:public"], - deps = [ - "//score/itf/core/utils/process", - ], -) diff --git a/score/itf/core/utils/BUILD b/score/itf/core/utils/BUILD index cf01142..676d1b4 100644 --- a/score/itf/core/utils/BUILD +++ b/score/itf/core/utils/BUILD @@ -20,9 +20,5 @@ py_library( "bunch.py", "utils.py", ], - imports = ["."], visibility = ["//visibility:public"], - deps = [ - "//score/itf/core/utils/process", - ], ) diff --git a/score/itf/core/utils/process/__init__.py b/score/itf/core/utils/process/__init__.py deleted file mode 100644 index 6bdeed2..0000000 --- a/score/itf/core/utils/process/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# ******************************************************************************* -# 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 -# ******************************************************************************* diff --git a/score/itf/plugins/dlt/BUILD b/score/itf/plugins/dlt/BUILD index 4b0511f..b048838 100644 --- a/score/itf/plugins/dlt/BUILD +++ b/score/itf/plugins/dlt/BUILD @@ -39,6 +39,7 @@ py_library( ], visibility = ["//visibility:public"], deps = [ + "//score/itf/core/process", "//score/itf/core/utils", "//third_party/python_dlt", ], diff --git a/score/itf/plugins/dlt/dlt_receive.py b/score/itf/plugins/dlt/dlt_receive.py index 7fb21ff..79daa61 100644 --- a/score/itf/plugins/dlt/dlt_receive.py +++ b/score/itf/plugins/dlt/dlt_receive.py @@ -15,7 +15,7 @@ import os from score.itf.core.utils.bazel import get_output_dir -from score.itf.core.utils.process.process_wrapper import ProcessWrapper +from score.itf.core.process.process_wrapper import ProcessWrapper logger = logging.getLogger(__name__) diff --git a/score/itf/plugins/dlt/dlt_window.py b/score/itf/plugins/dlt/dlt_window.py index 7ff517d..29305cf 100644 --- a/score/itf/plugins/dlt/dlt_window.py +++ b/score/itf/plugins/dlt/dlt_window.py @@ -17,7 +17,7 @@ import dlt.dlt as python_dlt from score.itf.core.utils.bunch import Bunch -from score.itf.core.utils.process.process_wrapper import ProcessWrapper +from score.itf.core.process.process_wrapper import ProcessWrapper from score.itf.plugins.dlt.dlt_receive import DltReceive, Protocol, protocol_arguments diff --git a/score/itf/plugins/plugins.bzl b/score/itf/plugins/plugins.bzl index 3ea7d4c..659fb50 100644 --- a/score/itf/plugins/plugins.bzl +++ b/score/itf/plugins/plugins.bzl @@ -28,10 +28,10 @@ docker = py_itf_plugin( ], ) -base = py_itf_plugin( - py_library = "@score_itf//score/itf/core/base", +qemu = py_itf_plugin( + py_library = "@score_itf//score/itf/plugins/qemu", enabled_plugins = [ - "score.itf.core.base.base_plugin", + "score.itf.plugins.qemu", ], args = [ ], diff --git a/score/itf/plugins/qemu/BUILD b/score/itf/plugins/qemu/BUILD new file mode 100644 index 0000000..0a76928 --- /dev/null +++ b/score/itf/plugins/qemu/BUILD @@ -0,0 +1,51 @@ +# ******************************************************************************* +# 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 +# ******************************************************************************* + +load("@itf_pip//:requirements.bzl", "requirement") +load("@rules_python//python:defs.bzl", "py_library") + +py_library( + name = "qemu", + srcs = [ + "__init__.py", + "base/__init__.py", + "base/constants.py", + "base/os/__init__.py", + "base/os/config.py", + "base/os/operating_system.py", + "base/target/__init__.py", + "base/target/base_target.py", + "base/target/config/__init__.py", + "base/target/config/base_processor.py", + "base/target/config/config.py", + "base/target/config/ecu.py", + "base/target/config/performance_processor.py", + "base/target/config/safety_processor.py", + "base/target/processors/__init__.py", + "base/target/processors/qemu_processor.py", + "base/target/processors/safety_processor.py", + "base/target/processors/target_processor.py", + "base/target/qemu_target.py", + "base/utils/__init__.py", + "base/utils/exec_utils.py", + "qemu.py", + "qemu_process.py", + ], + imports = ["."], + visibility = ["//visibility:public"], + deps = [ + "//score/itf/core/process", + "//score/itf/core/utils", + requirement("netifaces"), + ], +) diff --git a/score/itf/core/base/base_plugin.py b/score/itf/plugins/qemu/__init__.py similarity index 89% rename from score/itf/core/base/base_plugin.py rename to score/itf/plugins/qemu/__init__.py index 9cf002a..f437223 100644 --- a/score/itf/core/base/base_plugin.py +++ b/score/itf/plugins/qemu/__init__.py @@ -14,11 +14,11 @@ import socket import pytest -from score.itf.core.base.constants import TEST_CONFIG_KEY, TARGET_CONFIG_KEY -from score.itf.core.base.target.config import load_configuration, target_ecu_argparse -from score.itf.core.base.os.operating_system import OperatingSystem -from score.itf.core.base.target.qemu_target import qemu_target -from score.itf.core.base.utils.exec_utils import pre_tests_phase, post_tests_phase +from score.itf.plugins.qemu.base.constants import TEST_CONFIG_KEY, TARGET_CONFIG_KEY +from score.itf.plugins.qemu.base.target.config import load_configuration, target_ecu_argparse +from score.itf.plugins.qemu.base.os.operating_system import OperatingSystem +from score.itf.plugins.qemu.base.target.qemu_target import qemu_target +from score.itf.plugins.qemu.base.utils.exec_utils import pre_tests_phase, post_tests_phase from score.itf.core.utils import padder from score.itf.core.utils.bunch import Bunch diff --git a/score/itf/core/base/os/__init__.py b/score/itf/plugins/qemu/base/__init__.py similarity index 100% rename from score/itf/core/base/os/__init__.py rename to score/itf/plugins/qemu/base/__init__.py diff --git a/score/itf/core/base/constants.py b/score/itf/plugins/qemu/base/constants.py similarity index 100% rename from score/itf/core/base/constants.py rename to score/itf/plugins/qemu/base/constants.py diff --git a/score/itf/core/base/target/__init__.py b/score/itf/plugins/qemu/base/os/__init__.py similarity index 100% rename from score/itf/core/base/target/__init__.py rename to score/itf/plugins/qemu/base/os/__init__.py diff --git a/score/itf/core/base/os/config.py b/score/itf/plugins/qemu/base/os/config.py similarity index 100% rename from score/itf/core/base/os/config.py rename to score/itf/plugins/qemu/base/os/config.py diff --git a/score/itf/core/base/os/operating_system.py b/score/itf/plugins/qemu/base/os/operating_system.py similarity index 91% rename from score/itf/core/base/os/operating_system.py rename to score/itf/plugins/qemu/base/os/operating_system.py index 20c7c93..1167aa5 100644 --- a/score/itf/core/base/os/operating_system.py +++ b/score/itf/plugins/qemu/base/os/operating_system.py @@ -11,7 +11,7 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* from enum import Enum -from score.itf.core.base.os.config import global_os_config as os_config +from score.itf.plugins.qemu.base.os.config import global_os_config as os_config # pylint: disable=no-member diff --git a/score/itf/core/base/target/processors/__init__.py b/score/itf/plugins/qemu/base/target/__init__.py similarity index 100% rename from score/itf/core/base/target/processors/__init__.py rename to score/itf/plugins/qemu/base/target/__init__.py diff --git a/score/itf/core/base/target/base_target.py b/score/itf/plugins/qemu/base/target/base_target.py similarity index 92% rename from score/itf/core/base/target/base_target.py rename to score/itf/plugins/qemu/base/target/base_target.py index 5bf85f5..ce015df 100644 --- a/score/itf/core/base/target/base_target.py +++ b/score/itf/plugins/qemu/base/target/base_target.py @@ -12,9 +12,9 @@ # ******************************************************************************* import logging -from score.itf.core.base.target.processors.target_processor import TargetProcessor -from score.itf.core.base.os.operating_system import OperatingSystem -from score.itf.core.base.target.config.ecu import Ecu +from score.itf.plugins.qemu.base.target.processors.target_processor import TargetProcessor +from score.itf.plugins.qemu.base.os.operating_system import OperatingSystem +from score.itf.plugins.qemu.base.target.config.ecu import Ecu logger = logging.getLogger(__name__) diff --git a/score/itf/core/base/target/config/__init__.py b/score/itf/plugins/qemu/base/target/config/__init__.py similarity index 100% rename from score/itf/core/base/target/config/__init__.py rename to score/itf/plugins/qemu/base/target/config/__init__.py diff --git a/score/itf/core/base/target/config/base_processor.py b/score/itf/plugins/qemu/base/target/config/base_processor.py similarity index 100% rename from score/itf/core/base/target/config/base_processor.py rename to score/itf/plugins/qemu/base/target/config/base_processor.py diff --git a/score/itf/core/base/target/config/config.py b/score/itf/plugins/qemu/base/target/config/config.py similarity index 93% rename from score/itf/core/base/target/config/config.py rename to score/itf/plugins/qemu/base/target/config/config.py index 38e0d7e..855a8d4 100644 --- a/score/itf/core/base/target/config/config.py +++ b/score/itf/plugins/qemu/base/target/config/config.py @@ -13,9 +13,9 @@ import json import logging -from score.itf.core.base.target.config.base_processor import BaseProcessor -from score.itf.core.base.target.config.performance_processor import PerformanceProcessor -from score.itf.core.base.target.config.ecu import Ecu +from score.itf.plugins.qemu.base.target.config.base_processor import BaseProcessor +from score.itf.plugins.qemu.base.target.config.performance_processor import PerformanceProcessor +from score.itf.plugins.qemu.base.target.config.ecu import Ecu logger = logging.getLogger(__name__) diff --git a/score/itf/core/base/target/config/ecu.py b/score/itf/plugins/qemu/base/target/config/ecu.py similarity index 90% rename from score/itf/core/base/target/config/ecu.py rename to score/itf/plugins/qemu/base/target/config/ecu.py index c337523..6f07ef1 100644 --- a/score/itf/core/base/target/config/ecu.py +++ b/score/itf/plugins/qemu/base/target/config/ecu.py @@ -11,8 +11,8 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* from typing import List -from score.itf.core.base.target.config.base_processor import BaseProcessor -from score.itf.core.base.target.config.performance_processor import PerformanceProcessor +from score.itf.plugins.qemu.base.target.config.base_processor import BaseProcessor +from score.itf.plugins.qemu.base.target.config.performance_processor import PerformanceProcessor class Ecu: diff --git a/score/itf/core/base/target/config/performance_processor.py b/score/itf/plugins/qemu/base/target/config/performance_processor.py similarity index 98% rename from score/itf/core/base/target/config/performance_processor.py rename to score/itf/plugins/qemu/base/target/config/performance_processor.py index 057a1f3..8bb6a6a 100644 --- a/score/itf/core/base/target/config/performance_processor.py +++ b/score/itf/plugins/qemu/base/target/config/performance_processor.py @@ -10,7 +10,7 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* -from score.itf.core.base.target.config.base_processor import BaseProcessor +from score.itf.plugins.qemu.base.target.config.base_processor import BaseProcessor class PerformanceProcessor(BaseProcessor): diff --git a/score/itf/core/base/target/config/safety_processor.py b/score/itf/plugins/qemu/base/target/config/safety_processor.py similarity index 96% rename from score/itf/core/base/target/config/safety_processor.py rename to score/itf/plugins/qemu/base/target/config/safety_processor.py index 60d78ec..2b17713 100644 --- a/score/itf/core/base/target/config/safety_processor.py +++ b/score/itf/plugins/qemu/base/target/config/safety_processor.py @@ -10,7 +10,7 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* -from score.itf.core.base.target.config.base_processor import BaseProcessor +from score.itf.plugins.qemu.base.target.config.base_processor import BaseProcessor class SafetyProcessor(BaseProcessor): diff --git a/score/itf/core/base/utils/__init__.py b/score/itf/plugins/qemu/base/target/processors/__init__.py similarity index 100% rename from score/itf/core/base/utils/__init__.py rename to score/itf/plugins/qemu/base/target/processors/__init__.py diff --git a/score/itf/core/base/target/processors/qemu_processor.py b/score/itf/plugins/qemu/base/target/processors/qemu_processor.py similarity index 78% rename from score/itf/core/base/target/processors/qemu_processor.py rename to score/itf/plugins/qemu/base/target/processors/qemu_processor.py index 0cd3dc3..292d81a 100644 --- a/score/itf/core/base/target/processors/qemu_processor.py +++ b/score/itf/plugins/qemu/base/target/processors/qemu_processor.py @@ -10,9 +10,9 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* -from score.itf.core.base.os.operating_system import OperatingSystem -from score.itf.core.base.target.config.base_processor import BaseProcessor -from score.itf.core.base.target.processors.target_processor import TargetProcessor +from score.itf.plugins.qemu.base.os.operating_system import OperatingSystem +from score.itf.plugins.qemu.base.target.config.base_processor import BaseProcessor +from score.itf.plugins.qemu.base.target.processors.target_processor import TargetProcessor class TargetProcessorQemu(TargetProcessor): diff --git a/score/itf/core/base/target/processors/safety_processor.py b/score/itf/plugins/qemu/base/target/processors/safety_processor.py similarity index 77% rename from score/itf/core/base/target/processors/safety_processor.py rename to score/itf/plugins/qemu/base/target/processors/safety_processor.py index 60facfa..8e976ba 100644 --- a/score/itf/core/base/target/processors/safety_processor.py +++ b/score/itf/plugins/qemu/base/target/processors/safety_processor.py @@ -10,9 +10,9 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* -from score.itf.core.base.os.operating_system import OperatingSystem -from score.itf.core.base.target.config.base_processor import BaseProcessor -from score.itf.core.base.target.processors.target_processor import TargetProcessor +from score.itf.plugins.qemu.base.os.operating_system import OperatingSystem +from score.itf.plugins.qemu.base.target.config.base_processor import BaseProcessor +from score.itf.plugins.qemu.base.target.processors.target_processor import TargetProcessor class TargetSafetyProcessor(TargetProcessor): diff --git a/score/itf/core/base/target/processors/target_processor.py b/score/itf/plugins/qemu/base/target/processors/target_processor.py similarity index 96% rename from score/itf/core/base/target/processors/target_processor.py rename to score/itf/plugins/qemu/base/target/processors/target_processor.py index 1f0dadf..7b3a026 100644 --- a/score/itf/core/base/target/processors/target_processor.py +++ b/score/itf/plugins/qemu/base/target/processors/target_processor.py @@ -12,8 +12,8 @@ # ******************************************************************************* import logging -from score.itf.core.base.target.config.base_processor import BaseProcessor -from score.itf.core.base.os.operating_system import OperatingSystem +from score.itf.plugins.qemu.base.target.config.base_processor import BaseProcessor +from score.itf.plugins.qemu.base.os.operating_system import OperatingSystem from score.itf.core.com.sftp import Sftp from score.itf.core.com.ssh import Ssh diff --git a/score/itf/core/base/target/qemu_target.py b/score/itf/plugins/qemu/base/target/qemu_target.py similarity index 81% rename from score/itf/core/base/target/qemu_target.py rename to score/itf/plugins/qemu/base/target/qemu_target.py index c19ce1d..4331718 100644 --- a/score/itf/core/base/target/qemu_target.py +++ b/score/itf/plugins/qemu/base/target/qemu_target.py @@ -12,11 +12,11 @@ # ******************************************************************************* from contextlib import contextmanager, nullcontext -from score.itf.core.base.os.operating_system import OperatingSystem -from score.itf.core.base.target.base_target import Target -from score.itf.core.base.target.config.ecu import Ecu -from score.itf.core.base.target.processors.qemu_processor import TargetProcessorQemu -from score.itf.core.qemu.qemu_process import QemuProcess as Qemu +from score.itf.plugins.qemu.base.os.operating_system import OperatingSystem +from score.itf.plugins.qemu.base.target.base_target import Target +from score.itf.plugins.qemu.base.target.config.ecu import Ecu +from score.itf.plugins.qemu.base.target.processors.qemu_processor import TargetProcessorQemu +from score.itf.plugins.qemu.qemu_process import QemuProcess as Qemu class TargetQemu(Target): diff --git a/score/itf/core/qemu/__init__.py b/score/itf/plugins/qemu/base/utils/__init__.py similarity index 100% rename from score/itf/core/qemu/__init__.py rename to score/itf/plugins/qemu/base/utils/__init__.py diff --git a/score/itf/core/base/utils/exec_utils.py b/score/itf/plugins/qemu/base/utils/exec_utils.py similarity index 97% rename from score/itf/core/base/utils/exec_utils.py rename to score/itf/plugins/qemu/base/utils/exec_utils.py index 16fcfb9..c86dca6 100644 --- a/score/itf/core/base/utils/exec_utils.py +++ b/score/itf/plugins/qemu/base/utils/exec_utils.py @@ -15,7 +15,7 @@ import logging -from score.itf.core.base.target.base_target import Target +from score.itf.plugins.qemu.base.target.base_target import Target from score.itf.core.com.ssh import execute_command diff --git a/score/itf/core/qemu/qemu.py b/score/itf/plugins/qemu/qemu.py similarity index 100% rename from score/itf/core/qemu/qemu.py rename to score/itf/plugins/qemu/qemu.py diff --git a/score/itf/core/qemu/qemu_process.py b/score/itf/plugins/qemu/qemu_process.py similarity index 94% rename from score/itf/core/qemu/qemu_process.py rename to score/itf/plugins/qemu/qemu_process.py index cd8cfa3..91afbd6 100644 --- a/score/itf/core/qemu/qemu_process.py +++ b/score/itf/plugins/qemu/qemu_process.py @@ -13,8 +13,8 @@ import logging import subprocess -from score.itf.core.utils.process.console import PipeConsole -from score.itf.core.qemu.qemu import Qemu +from score.itf.core.process.console import PipeConsole +from score.itf.plugins.qemu.qemu import Qemu logger = logging.getLogger(__name__) diff --git a/test/BUILD b/test/BUILD index 99c59ad..447ed87 100644 --- a/test/BUILD +++ b/test/BUILD @@ -11,7 +11,7 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* load("//:defs.bzl", "py_itf_test") -load("//score/itf/plugins:plugins.bzl", "base", "dlt", "docker") +load("//score/itf/plugins:plugins.bzl", "dlt", "docker", "qemu") py_itf_test( name = "test_rules_are_working_correctly", @@ -66,7 +66,7 @@ py_itf_test( "//test/resources:target_config", ], plugins = [ - base, + qemu, dlt, ], tags = [ @@ -89,7 +89,7 @@ py_itf_test( "//test/resources:target_config", ], plugins = [ - base, + qemu, ], tags = [ "local", @@ -103,7 +103,7 @@ py_itf_test( "test_ssh.py", ], args = [ - "--target_config=$(location resources/target_config.json)", + "--target_config=$(location //test/resources:target_config)", "--ecu=s_core_ecu_qemu_port_forwarding", "--qemu", ], @@ -111,7 +111,7 @@ py_itf_test( "//test/resources:target_config", ], plugins = [ - base, + qemu, dlt, ], tags = [