|
| 1 | +# ******************************************************************************* |
| 2 | +# Copyright (c) 2026 Contributors to the Eclipse Foundation |
| 3 | +# |
| 4 | +# See the NOTICE file(s) distributed with this work for additional |
| 5 | +# information regarding copyright ownership. |
| 6 | +# |
| 7 | +# This program and the accompanying materials are made available under the |
| 8 | +# terms of the Apache License Version 2.0 which is available at |
| 9 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# SPDX-License-Identifier: Apache-2.0 |
| 12 | +# ******************************************************************************* |
| 13 | +load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_files") |
| 14 | +load("@rules_pkg//pkg:tar.bzl", "pkg_tar") |
| 15 | +load("//:defs.bzl", "launch_manager_config") |
| 16 | +load("//tests/utils/bazel:integration.bzl", "integration_test") |
| 17 | + |
| 18 | +launch_manager_config( |
| 19 | + name = "lm_process_wrong_binary_failure_config", |
| 20 | + config = "//tests/integration/process_wrong_binary_failure:process_wrong_binary_failure.json", |
| 21 | + flatbuffer_out_dir = "etc", |
| 22 | +) |
| 23 | + |
| 24 | +cc_binary( |
| 25 | + name = "control_client_mock", |
| 26 | + srcs = ["control_client_mock.cpp"], |
| 27 | + deps = [ |
| 28 | + "//score/launch_manager:control_cc", |
| 29 | + "//score/launch_manager:lifecycle_cc", |
| 30 | + "//tests/utils/test_helper", |
| 31 | + "@googletest//:gtest_main", |
| 32 | + ], |
| 33 | +) |
| 34 | + |
| 35 | +pkg_files( |
| 36 | + name = "process_wrong_binary_failure_main_files", |
| 37 | + srcs = [ |
| 38 | + ":control_client_mock", |
| 39 | + "//score/launch_manager", |
| 40 | + "//tests/utils/test_helper:verification_process", |
| 41 | + ], |
| 42 | + attributes = pkg_attributes(mode = "0755"), |
| 43 | + prefix = "tests/process_wrong_binary_failure", |
| 44 | +) |
| 45 | + |
| 46 | +pkg_files( |
| 47 | + name = "process_wrong_binary_failure_etc_files", |
| 48 | + srcs = [":lm_process_wrong_binary_failure_config"], |
| 49 | + prefix = "tests/process_wrong_binary_failure", |
| 50 | +) |
| 51 | + |
| 52 | +pkg_tar( |
| 53 | + name = "process_wrong_binary_failure_binaries", |
| 54 | + srcs = [ |
| 55 | + ":process_wrong_binary_failure_etc_files", |
| 56 | + ":process_wrong_binary_failure_main_files", |
| 57 | + ], |
| 58 | +) |
| 59 | + |
| 60 | +integration_test( |
| 61 | + name = "process_wrong_binary_failure", |
| 62 | + srcs = ["process_wrong_binary_failure.py"], |
| 63 | + tags = ["integration"], |
| 64 | + test_binaries = ":process_wrong_binary_failure_binaries", |
| 65 | + deps = ["//tests/utils/testing_utils"], |
| 66 | +) |
0 commit comments