Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.1.0
8.5.0
22 changes: 8 additions & 14 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module(
# Python version
#
###############################################################################
bazel_dep(name = "rules_python", version = "1.4.1")
bazel_dep(name = "rules_python", version = "1.8.5")

PYTHON_VERSION = "3.12"

Expand All @@ -30,7 +30,6 @@ python.toolchain(
is_default = True,
python_version = PYTHON_VERSION,
)
use_repo(python)

###############################################################################
#
Expand All @@ -51,40 +50,35 @@ use_repo(pip, "itf_pip")
# Provides formatting and linting of Bazel files.
#
###############################################################################
bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2")
bazel_dep(name = "buildifier_prebuilt", version = "8.2.1.2", dev_dependency = True)

###############################################################################
#
# Generic linting and formatting rules
#
###############################################################################
bazel_dep(name = "aspect_rules_lint", version = "1.0.0-rc9")
git_override(
module_name = "aspect_rules_lint",
commit = "b5dfbc12754d6698c36d0aaad46183e730dac85c",
remote = "https://github.com/ltekieli/rules_lint.git",
)
bazel_dep(name = "aspect_rules_lint", version = "2.2.0", dev_dependency = True)

###############################################################################
#
# C++ rules
#
###############################################################################
bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "rules_cc", version = "0.2.17")

###############################################################################
#
# Shell dependency
#
###############################################################################
bazel_dep(name = "rules_shell", version = "0.6.0")
bazel_dep(name = "rules_shell", version = "0.6.1")

###############################################################################
#
# Container dependencies
#
###############################################################################
bazel_dep(name = "rules_oci", version = "1.8.0")
bazel_dep(name = "rules_oci", version = "2.2.7", dev_dependency = True)

oci = use_extension("@rules_oci//oci:extensions.bzl", "oci", dev_dependency = True)

Expand All @@ -98,14 +92,14 @@ oci.pull(
)

# For each oci.pull call, repeat the "name" here to expose them as dependencies.
use_repo(oci, "ubuntu_24_04")
use_repo(oci, "ubuntu_24_04", "ubuntu_24_04_linux_amd64")

###############################################################################
#
# Packaging dependencies
#
###############################################################################
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "rules_pkg", version = "1.2.0", dev_dependency = True)

###############################################################################
#
Expand Down
14 changes: 7 additions & 7 deletions examples/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,23 @@ register_toolchains("@llvm_toolchain//:all")
# C++ rules
#
###############################################################################
bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "rules_cc", version = "0.2.17")

###############################################################################
#
# Shell dependency
#
###############################################################################
bazel_dep(name = "rules_shell", version = "0.6.0")
bazel_dep(name = "rules_shell", version = "0.6.1")

###############################################################################
#
# Container dependencies
#
###############################################################################
bazel_dep(name = "rules_oci", version = "1.8.0")
bazel_dep(name = "rules_oci", version = "2.2.7")

oci = use_extension("@rules_oci//oci:extensions.bzl", "oci", dev_dependency = True)
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")

# Declare external images you need to pull, for example:
oci.pull(
Expand All @@ -83,21 +83,21 @@ oci.pull(
)

# For each oci.pull call, repeat the "name" here to expose them as dependencies.
use_repo(oci, "ubuntu_24_04_examples")
use_repo(oci, "ubuntu_24_04_examples", "ubuntu_24_04_examples_linux_amd64")

###############################################################################
#
# Packaging dependencies
#
###############################################################################
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "rules_pkg", version = "1.2.0")

###############################################################################
#
# Google Test dependency
#
###############################################################################
bazel_dep(name = "googletest", version = "1.15.0")
bazel_dep(name = "googletest", version = "1.17.0")

################################################################################
#
Expand Down
6 changes: 3 additions & 3 deletions examples/examples/docker/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_tarball")
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_load")

oci_image(
name = "image",
Expand All @@ -20,8 +20,8 @@ oci_image(
],
)

oci_tarball(
name = "image_tarball",
oci_load(
name = "image_load",
image = ":image",
repo_tags = ["score_itf_examples:latest"],
visibility = ["//examples/itf:__pkg__"],
Expand Down
6 changes: 2 additions & 4 deletions examples/examples/itf/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ py_itf_test(
"test_docker.py",
],
args = [
"--docker-image-bootstrap=$(location //examples/docker:image_tarball)",
"--docker-image-bootstrap=$(location //examples/docker:image_load)",
"--docker-image=score_itf_examples:latest",
],
data = ["//examples/docker:image_tarball"],
data = ["//examples/docker:image_load"],
plugins = [
docker,
],
Expand Down Expand Up @@ -62,7 +62,6 @@ py_itf_test(
dlt,
],
tags = [
"local",
"manual",
],
)
Expand All @@ -85,7 +84,6 @@ py_itf_test(
dlt,
],
tags = [
"local",
"manual",
],
)
6 changes: 3 additions & 3 deletions score/itf/core/com/sftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ def upload(self, local_path, remote_path, verbose=True):
if not os.path.exists(local_path):
logger.error(f"Missing file '{local_path}' while trying to upload")
remote_dir = os.path.dirname(remote_path)
assert (
self._ssh.execute_command(f"test -d {remote_dir} || mkdir -p {remote_dir}") == 0
), f"Could not create remote path: {os.path.dirname(remote_path)}"
assert self._ssh.execute_command(f"test -d {remote_dir} || mkdir -p {remote_dir}") == 0, (
f"Could not create remote path: {os.path.dirname(remote_path)}"
)
self._sftp.put(local_path, remote_path)

def list_dirs_and_files(self, remote_path):
Expand Down
22 changes: 13 additions & 9 deletions score/itf/plugins/qemu/qemu_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,18 @@ def ping_lost(self, timeout, interval=1, wait_ms_precision=None):
@contextmanager
def qemu_target(test_config):
"""Context manager for QEMU target setup."""
with QemuProcess(
test_config.qemu_image,
test_config.qemu_config.qemu_ram_size,
test_config.qemu_config.qemu_num_cores,
network_adapters=[adapter.name for adapter in test_config.qemu_config.networks],
port_forwarding=test_config.qemu_config.port_forwarding
if hasattr(test_config.qemu_config, "port_forwarding")
else [],
) if test_config.qemu_image else nullcontext() as qemu_process:
with (
QemuProcess(
test_config.qemu_image,
test_config.qemu_config.qemu_ram_size,
test_config.qemu_config.qemu_num_cores,
network_adapters=[adapter.name for adapter in test_config.qemu_config.networks],
port_forwarding=test_config.qemu_config.port_forwarding
if hasattr(test_config.qemu_config, "port_forwarding")
else [],
)
if test_config.qemu_image
else nullcontext() as qemu_process
):
target = QemuTarget(qemu_process, test_config.qemu_config)
yield target
4 changes: 2 additions & 2 deletions test/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ py_itf_test(
"test_dlt.py",
],
args = [
"--docker-image-bootstrap=$(location //test/resources:image_tarball)",
"--docker-image-bootstrap=$(location //test/resources:image_load)",
"--docker-image=score_itf_examples:latest",
],
data = ["//test/resources:image_tarball"],
data = ["//test/resources:image_load"],
plugins = [
dlt,
docker,
Expand Down
6 changes: 3 additions & 3 deletions test/resources/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_tarball")
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_load")
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")

filegroup(
Expand Down Expand Up @@ -86,8 +86,8 @@ oci_image(
],
)

oci_tarball(
name = "image_tarball",
oci_load(
name = "image_load",
image = ":image",
repo_tags = ["score_itf_examples:latest"],
visibility = [
Expand Down