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
Original file line number Diff line number Diff line change
Expand Up @@ -384,18 +384,6 @@ cc_library(
],
)

cc_library(
name = "mock_proc_launch_syscalls",
testonly = True,
hdrs = ["mock_proc_launch_syscalls.hpp"],
include_prefix = "score/mw/launch_manager/process_group_manager/details",
strip_include_prefix = "/score/launch_manager/src/daemon/src/process_group_manager/details",
visibility = ["//score/launch_manager/src/daemon/src/process_group_manager:__pkg__"],
deps = [
"@googletest//:gtest_main",
],
)

lm_cc_test(
name = "process_launcher_UT",
srcs = ["process_launcher_UT.cpp"],
Expand Down Expand Up @@ -426,8 +414,8 @@ lm_cc_test(
],
linkstatic = True,
deps = [
":mock_proc_launch_syscalls",
":process_launcher",
"//tests/utils/mocks:mock_syscalls",
"@googletest//:gtest_main",
],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#include <cstdarg>
#include <thread>

#include "score/mw/launch_manager/process_group_manager/details/mock_proc_launch_syscalls.hpp"
#include "score/mw/launch_manager/process_group_manager/details/process_launcher.hpp"
#include "tests/utils/mocks/mock_syscalls.hpp"

using namespace testing;

Expand Down
23 changes: 23 additions & 0 deletions tests/utils/mocks/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# *******************************************************************************
# Copyright (c) 2026 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_cc//cc:cc_library.bzl", "cc_library")

cc_library(
name = "mock_syscalls",
hdrs = ["mock_syscalls.hpp"],
visibility = ["//score:__subpackages__"],
deps = [
"@googletest//:gtest_main",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

#ifndef MOCK_PROC_LAUNCH_SYSCALLS
#define MOCK_PROC_LAUNCH_SYSCALLS
#ifndef MOCK_SYSCALLS
#define MOCK_SYSCALLS

#include <fcntl.h>
#include <grp.h>
Expand Down Expand Up @@ -403,4 +403,4 @@ std::int32_t setaffinity(std::uint64_t cpumask) noexcept(true)

// NOLINTEND

#endif
#endif // MOCK_SYSCALLS
Loading