Skip to content
Closed
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
5 changes: 4 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ common --registry=https://bcr.bazel.build
test --test_output=errors

build:x86_64-qnx --incompatible_strict_action_env
build:x86_64-qnx --platforms=@score_bazel_platforms//:x86_64-qnx8_0
build:x86_64-qnx --platforms=@score_bazel_platforms//:x86_64-qnx-sdp_8.0.0-posix
build:x86_64-qnx --sandbox_writable_path=/var/tmp
build:x86_64-qnx --extra_toolchains=@score_qcc_x86_64_toolchain//:x86_64-qnx-sdp_8.0.0
build:x86_64-qnx --extra_toolchains=@score_qnx_x86_64_ifs_toolchain//:ifs-x86_64-qnx-sdp_8.0.0
build:x86_64-qnx --credential_helper=*.qnx.com=%workspace%/tools/qnx_credential_helper.py

test:qemu-integration --config=x86_64-qnx
test:qemu-integration --run_under=//scripts:run_under_qemu
40 changes: 27 additions & 13 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ bazel_dep(name = "bazel_skylib", version = "1.9.0")
#
###############################################################################
bazel_dep(name = "score_tooling", version = "1.1.2")
bazel_dep(name = "score_bazel_platforms", version = "0.0.3")
bazel_dep(name = "score_bazel_platforms", version = "0.1.2")
bazel_dep(name = "platforms", version = "1.0.0")

################################################################################
Expand Down Expand Up @@ -177,18 +177,32 @@ http_archive(
# Load QNX dependencies
#
################################################################################
bazel_dep(name = "score_toolchains_qnx", version = "0.0.7", dev_dependency = True)

toolchains_qnx = use_extension("@score_toolchains_qnx//:extensions.bzl", "toolchains_qnx", dev_dependency = True)
toolchains_qnx.sdp(
sha256 = "f2e0cb21c6baddbcb65f6a70610ce498e7685de8ea2e0f1648f01b327f6bac63",
strip_prefix = "installation",
url = "https://www.qnx.com/download/download/79858/installation.tgz",
bazel_dep(name = "score_bazel_cpp_toolchains", version = "0.5.0", dev_dependency = True)

gcc = use_extension("@score_bazel_cpp_toolchains//extensions:gcc.bzl", "gcc", dev_dependency = True)
gcc.toolchain(
name = "score_qcc_x86_64_toolchain",
sdp_version = "8.0.3",
target_cpu = "x86_64",
target_os = "qnx",
use_default_package = True,
version = "12.2.0",
)
use_repo(
gcc,
"score_qcc_x86_64_toolchain",
"score_qcc_x86_64_toolchain_pkg",
)
use_repo(toolchains_qnx, "toolchains_qnx_sdp")
use_repo(toolchains_qnx, "toolchains_qnx_ifs")

register_toolchains(
"@toolchains_qnx_ifs//:ifs_x86_64",
dev_dependency = True,
bazel_dep(name = "score_rules_imagefs", version = "0.0.3", dev_dependency = True)

imagefs = use_extension("@score_rules_imagefs//extensions:imagefs.bzl", "imagefs", dev_dependency = True)
imagefs.toolchain(
name = "score_qnx_x86_64_ifs_toolchain",
sdp_to_import = "@score_qcc_x86_64_toolchain_pkg",
sdp_version = "8.0.0",
target_cpu = "x86_64",
target_os = "qnx",
type = "ifs",
)
use_repo(imagefs, "score_qnx_x86_64_ifs_toolchain")
5 changes: 4 additions & 1 deletion examples/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ test --test_output=errors
test:qemu-integration --run_under=@score_itf//scripts:run_under_qemu

build:x86_64-qnx --incompatible_strict_action_env
build:x86_64-qnx --platforms=@score_bazel_platforms//:x86_64-qnx8_0
build:x86_64-qnx --platforms=@score_bazel_platforms//:x86_64-qnx-sdp_8.0.0-posix
build:x86_64-qnx --sandbox_writable_path=/var/tmp
build:x86_64-qnx --extra_toolchains=@score_qcc_x86_64_toolchain//:x86_64-qnx-sdp_8.0.0
build:x86_64-qnx --extra_toolchains=@score_qnx_x86_64_ifs_toolchain//:ifs-x86_64-qnx-sdp_8.0.0
build:x86_64-qnx --credential_helper=*.qnx.com=%workspace%/tools/qnx_credential_helper.py
39 changes: 28 additions & 11 deletions examples/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,36 @@ bazel_dep(name = "googletest", version = "1.17.0")
# Load QNX dependencies
#
################################################################################
bazel_dep(name = "score_toolchains_qnx", version = "0.0.7")
bazel_dep(name = "score_bazel_platforms", version = "0.0.3")

toolchains_qnx = use_extension("@score_toolchains_qnx//:extensions.bzl", "toolchains_qnx")
toolchains_qnx.sdp(
sha256 = "f2e0cb21c6baddbcb65f6a70610ce498e7685de8ea2e0f1648f01b327f6bac63",
strip_prefix = "installation",
url = "https://www.qnx.com/download/download/79858/installation.tgz",
bazel_dep(name = "score_bazel_platforms", version = "0.1.2")
bazel_dep(name = "score_bazel_cpp_toolchains", version = "0.5.0")

gcc = use_extension("@score_bazel_cpp_toolchains//extensions:gcc.bzl", "gcc")
gcc.toolchain(
name = "score_qcc_x86_64_toolchain",
sdp_version = "8.0.3",
target_cpu = "x86_64",
target_os = "qnx",
use_default_package = True,
version = "12.2.0",
)
use_repo(toolchains_qnx, "toolchains_qnx_sdp")
use_repo(toolchains_qnx, "toolchains_qnx_ifs")
use_repo(
gcc,
"score_qcc_x86_64_toolchain",
"score_qcc_x86_64_toolchain_pkg",
)

bazel_dep(name = "score_rules_imagefs", version = "0.0.3")

register_toolchains("@toolchains_qnx_ifs//:ifs_x86_64")
imagefs = use_extension("@score_rules_imagefs//extensions:imagefs.bzl", "imagefs")
imagefs.toolchain(
name = "score_qnx_x86_64_ifs_toolchain",
sdp_to_import = "@score_qcc_x86_64_toolchain_pkg",
sdp_version = "8.0.0",
target_cpu = "x86_64",
target_os = "qnx",
type = "ifs",
)
use_repo(imagefs, "score_qnx_x86_64_ifs_toolchain")

###############################################################################
#
Expand Down
2 changes: 2 additions & 0 deletions score/itf/plugins/qemu/qemu_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ def stop(self) -> int:
self._logger.error(f"Process with PID [{self._pid}] did not terminate properly, sending SIGKILL.")
self._kill()
self.wait()
# Allow sshd-session to clean up after SIGKILL (SDP 8.0.3 / OpenSSH 9.9)
time.sleep(1)
self._output_thread.join()
exit_code = self.get_exit_code()
self._close_ssh()
Expand Down
5 changes: 4 additions & 1 deletion test/resources/qnx/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

load("@score_toolchains_qnx//rules/fs:ifs.bzl", "qnx_ifs")
load("@score_rules_imagefs//rules/qnx:ifs.bzl", "qnx_ifs")

qnx_ifs(
name = "init",
srcs = [],
build_file = "init.build",
extra_build_files = ["tools.build"],
tags = ["manual"],
target_compatible_with = ["@platforms//os:qnx"],
visibility = ["//visibility:public"],
)
Loading
Loading