Skip to content
Draft
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
6 changes: 6 additions & 0 deletions score/mw/com/test/common_test_resources/proxy_container.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ void ProxyContainer<Proxy>::CreateProxy(InstanceSpecifier instance_specifier, co
FailTest(failure_message_prefix, " Consumer: StartFindService() failed to get handle");
}

auto stop_find_service_result = Proxy::StopFindService(start_find_service_result.value());
if (!stop_find_service_result.has_value())
{
FailTest(failure_message_prefix, " Consumer: StopFindService() failed: ", stop_find_service_result.error());
}

auto proxy_result = Proxy::Create(*handle_);
proxy_creation_lock.unlock();
if (!proxy_result.has_value())
Expand Down
3 changes: 3 additions & 0 deletions score/mw/com/test/methods/basic_acceptance_test/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ cc_binary(
"//score/mw/com",
"//score/mw/com/test/common_test_resources:assert_handler",
"//score/mw/com/test/common_test_resources:stop_token_sig_term_handler",
"//score/mw/com/test/methods/methods_test_resources:common_resources",
],
)

Expand All @@ -88,6 +89,7 @@ cc_binary(
":consumer",
"//score/mw/com",
"//score/mw/com/test/common_test_resources:assert_handler",
"//score/mw/com/test/methods/methods_test_resources:common_resources",
],
)

Expand All @@ -104,6 +106,7 @@ cc_binary(
"//score/mw/com",
"//score/mw/com/test/common_test_resources:assert_handler",
"//score/mw/com/test/common_test_resources:stop_token_sig_term_handler",
"//score/mw/com/test/methods/methods_test_resources:common_resources",
],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@


def provider(target, **kwargs):
args = []
args = ["--service_instance_manifest", "./etc/mw_com_config.json"]
return target.wrap_exec("bin/main_provider", args, cwd="/opt/MainProviderApp", wait_on_exit=True, **kwargs)


def consumer(target, **kwargs):
args = []
args = ["--service_instance_manifest", "./etc/mw_com_config.json"]
return target.wrap_exec("bin/main_consumer", args, cwd="/opt/MainConsumerApp", wait_on_exit=True, **kwargs)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


def consumer_and_provider(target, **kwargs):
args = []
args = ["--service_instance_manifest", "./etc/mw_com_config.json"]
return target.wrap_exec(
"bin/main_consumer_and_provider", args, cwd="/opt/MainConsumerAndProviderApp", wait_on_exit=True, **kwargs
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@

#include "score/mw/com/test/common_test_resources/assert_handler.h"
#include "score/mw/com/test/methods/basic_acceptance_test/consumer.h"
#include "score/mw/com/test/methods/methods_test_resources/common_resources.h"

int main(int argc, const char** argv)
{
auto service_instance_manifest_path = score::mw::com::test::ParseServiceInstanceManifest(argc, argv);

score::mw::com::test::SetupAssertHandler();
score::mw::com::runtime::InitializeRuntime(argc, argv);
score::mw::com::runtime::InitializeRuntime(
score::mw::com::runtime::RuntimeConfiguration{service_instance_manifest_path});
score::mw::com::test::run_consumer();
return EXIT_SUCCESS;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,19 @@
#include "score/mw/com/test/common_test_resources/stop_token_sig_term_handler.h"
#include "score/mw/com/test/methods/basic_acceptance_test/consumer.h"
#include "score/mw/com/test/methods/basic_acceptance_test/provider.h"
#include "score/mw/com/test/methods/methods_test_resources/common_resources.h"

#include <cstdlib>
#include <future>
#include <iostream>

int main(int argc, const char** argv)
{
auto service_instance_manifest_path = score::mw::com::test::ParseServiceInstanceManifest(argc, argv);

score::mw::com::test::SetupAssertHandler();
score::mw::com::runtime::InitializeRuntime(argc, argv);
score::mw::com::runtime::InitializeRuntime(
score::mw::com::runtime::RuntimeConfiguration{service_instance_manifest_path});

score::cpp::stop_source stop_source{};
const bool sig_term_handler_setup_success = score::mw::com::SetupStopTokenSigTermHandler(stop_source);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@
#include "score/mw/com/test/common_test_resources/assert_handler.h"
#include "score/mw/com/test/common_test_resources/stop_token_sig_term_handler.h"
#include "score/mw/com/test/methods/basic_acceptance_test/provider.h"
#include "score/mw/com/test/methods/methods_test_resources/common_resources.h"

#include <score/stop_token.hpp>

int main(int argc, const char** argv)
{
auto service_instance_manifest_path = score::mw::com::test::ParseServiceInstanceManifest(argc, argv);

score::mw::com::test::SetupAssertHandler();
score::mw::com::runtime::InitializeRuntime(argc, argv);
score::mw::com::runtime::InitializeRuntime(
score::mw::com::runtime::RuntimeConfiguration{service_instance_manifest_path});

score::cpp::stop_source stop_source{};
const bool sig_term_handler_setup_success = score::mw::com::SetupStopTokenSigTermHandler(stop_source);
Expand Down
105 changes: 105 additions & 0 deletions score/mw/com/test/methods/edge_cases_test/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# *******************************************************************************
# 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("@score_baselibs//score/language/safecpp:toolchain_features.bzl", "COMPILER_WARNING_FEATURES")
load("//score/mw/com/test:pkg_application.bzl", "pkg_application")

cc_binary(
name = "disabled_method_test",
srcs = ["disabled_method_test.cpp"],
data = ["config/disabled_methods_mw_com_config.json"],
features = COMPILER_WARNING_FEATURES + [
"aborts_upon_exception",
],
deps = [
"//score/mw/com",
"//score/mw/com/test/common_test_resources:assert_handler",
"//score/mw/com/test/common_test_resources:fail_test",
"//score/mw/com/test/common_test_resources:proxy_container",
"//score/mw/com/test/methods/methods_test_resources:common_resources",
"//score/mw/com/test/methods/methods_test_resources/all_signatures_datatype",
"//score/mw/com/test/methods/methods_test_resources/all_signatures_datatype:all_signatures_method_provider",
"@score_baselibs//score/language/futurecpp",
],
)

cc_binary(
name = "incomplete_handlers_test",
srcs = ["incomplete_handlers_test.cpp"],
data = ["config/mw_com_config.json"],
features = COMPILER_WARNING_FEATURES + [
"aborts_upon_exception",
],
deps = [
"//score/mw/com",
"//score/mw/com/test/common_test_resources:assert_handler",
"//score/mw/com/test/common_test_resources:fail_test",
"//score/mw/com/test/methods/methods_test_resources:common_resources",
"//score/mw/com/test/methods/methods_test_resources/all_signatures_datatype:all_signatures_method_provider",
"@score_baselibs//score/language/futurecpp",
],
)

cc_binary(
name = "proxy_recreation_test",
srcs = ["proxy_recreation_test.cpp"],
data = ["config/mw_com_config.json"],
features = COMPILER_WARNING_FEATURES + [
"aborts_upon_exception",
],
deps = [
"//score/mw/com",
"//score/mw/com/test/common_test_resources:assert_handler",
"//score/mw/com/test/methods/methods_test_resources:common_resources",
"//score/mw/com/test/methods/methods_test_resources/all_signatures_datatype:all_signatures_method_consumer",
"//score/mw/com/test/methods/methods_test_resources/all_signatures_datatype:all_signatures_method_provider",
"@score_baselibs//score/language/futurecpp",
],
)

cc_binary(
name = "skeleton_recreation_test",
srcs = ["skeleton_recreation_test.cpp"],
data = ["config/mw_com_config.json"],
features = COMPILER_WARNING_FEATURES + [
"aborts_upon_exception",
],
deps = [
"//score/mw/com",
"//score/mw/com/test/common_test_resources:assert_handler",
"//score/mw/com/test/common_test_resources:stop_token_sig_term_handler",
"//score/mw/com/test/methods/methods_test_resources:common_resources",
"//score/mw/com/test/methods/methods_test_resources/all_signatures_datatype:all_signatures_method_consumer",
"//score/mw/com/test/methods/methods_test_resources/all_signatures_datatype:all_signatures_method_provider",
"@score_baselibs//score/language/futurecpp",
],
)

pkg_application(
name = "edge-case-test-pkg",
app_name = "EdgeCasesTestApp",
bin = [
":disabled_method_test",
":incomplete_handlers_test",
":proxy_recreation_test",
":skeleton_recreation_test",
],
etc = [
"config/disabled_methods_mw_com_config.json",
"config/logging.json",
"config/mw_com_config.json",
],
visibility = [
"//score/mw/com/test/methods/edge_cases_test/integration_test:__subpackages__",
],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"serviceTypes": [
{
"serviceTypeName": "/test/methods/edge_cases_test/MethodSignature",
"version": {
"major": 1,
"minor": 0
},
"bindings": [
{
"binding": "SHM",
"serviceId": 2000,
"methods": [
{
"methodName": "with_in_args_and_return",
"methodId": 1
},
{
"methodName": "with_in_args_only",
"methodId": 2
},
{
"methodName": "with_return_only",
"methodId": 3
},
{
"methodName": "without_args_or_return",
"methodId": 4
}
]
}
]
}
],
"serviceInstances": [
{
"instanceSpecifier": "test/methods/edge_cases_test/MethodSignature",
"serviceTypeName": "/test/methods/edge_cases_test/MethodSignature",
"version": {
"major": 1,
"minor": 0
},
"instances": [
{
"instanceId": 1,
"asil-level": "B",
"binding": "SHM",
"methods": [
{
"methodName": "with_in_args_and_return",
"queueSize": 1,
"use": false
},
{
"methodName": "with_in_args_only",
"queueSize": 1,
"use": false
},
{
"methodName": "with_return_only",
"queueSize": 1,
"use": false
},
{
"methodName": "without_args_or_return",
"queueSize": 1,
"use": false
}
],
"allowedConsumer": {
"QM": [
0
],
"B": [
0
]
},
"allowedProvider": {
"QM": [
0
],
"B": [
0
]
}

}
]
}
],
"global": {
"asil-level": "B"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"appId": "SV",
"appDesc": "signature_variations",
"appId": "MECT",
"appDesc": "edge_cases_test",
"logLevel": "kDebug",
"logLevelThresholdConsole": "kDebug",
"logMode": "kRemote|kConsole"
}
}
Loading
Loading