diff --git a/CMakeLists.txt b/CMakeLists.txt index 7fd425f..e3b8726 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,7 +45,7 @@ if(NOT ANDROID) add_subdirectory(app/race-cli) add_subdirectory(test/common/UnifiedTestStub EXCLUDE_FROM_ALL) add_subdirectory(test/common/DecomposedTestStub EXCLUDE_FROM_ALL) - add_subdirectory(test/common/plugins/myOS/myArch/DecomposedTestImplementation EXCLUDE_FROM_ALL) + add_subdirectory(test/common/plugins/DecomposedTestImplementation EXCLUDE_FROM_ALL) add_subdirectory(test/source EXCLUDE_FROM_ALL) endif() @@ -63,4 +63,4 @@ install( install( EXPORT raceboat DESTINATION lib/cmake -) \ No newline at end of file +) diff --git a/source/FileSystem.cpp b/source/FileSystem.cpp index 9b2254f..1142990 100644 --- a/source/FileSystem.cpp +++ b/source/FileSystem.cpp @@ -171,6 +171,7 @@ std::vector FileSystem::listInstalledPluginDirs() { fs::path FileSystem::makePluginInstallBasePath() { fs::path basePath = pluginsInstallPath; + helper::logInfo("makePluginInstallBasePath: basePath: " + basePath.string()); // Previously: // pluginsInstallPath / "plugins" / getHostOsType() / getHostArch(); createDirectories(basePath); diff --git a/test/common/DecomposedTestStub/manifest.json b/test/common/DecomposedTestStub/manifest.json index c33bf87..b7c335e 100644 --- a/test/common/DecomposedTestStub/manifest.json +++ b/test/common/DecomposedTestStub/manifest.json @@ -5,8 +5,8 @@ "plugin_type": "comms", "file_type": "shared_library", "node_type": "any", - "shared_library_path": "DecomposedTestEncoding.so", - "encodings": ["DecomposedTestEncoding"] + "shared_library_path": "DecomposedTestStubEncoding.so", + "encodings": ["DecomposedTestStubEncoding"] }, { "file_path": "DecomposedTestStub", @@ -25,12 +25,75 @@ "transports": ["DecomposedTestTransport"] } ], + "channel_properties":{ + "DecomposedTestStub": { + "bootstrap": false, + "channelGid": "DecomposedTestStub", + "connectionType": "CT_INDIRECT", + "creatorExpected": { + "send": { + "bandwidth_bps": 277200, + "latency_ms": 3190, + "loss": 0.1 + }, + "receive": { + "bandwidth_bps": 277200, + "latency_ms": 3190, + "loss": 0.1 + } + }, + "description": "Implementation of the Two Six Labs Indirect communications utilizing the Two Six Whiteboard", + "duration_s": -1, + "linkDirection": "LD_BIDI", + "loaderExpected": { + "send": { + "bandwidth_bps": 277200, + "latency_ms": 3190, + "loss": 0.1 + }, + "receive": { + "bandwidth_bps": 277200, + "latency_ms": 3190, + "loss": 0.1 + } + }, + "mtu": -1, + "multiAddressable": false, + "period_s": -1, + "reliable": false, + "isFlushable": false, + "sendType": "ST_STORED_ASYNC", + "supported_hints": ["polling_interval_ms", "after"], + "transmissionType": "TT_MULTICAST", + "maxLinks": 1000, + "creatorsPerLoader": -1, + "loadersPerCreator": -1, + "roles": [ + { + "roleName": "default", + "mechanicalTags": [], + "behavioralTags": [], + "linkSide": "LS_BOTH" + } + ], + "maxSendsPerInterval": -1, + "secondsPerInterval": -1, + "intervalEndTime": 0, + "sendsRemainingInInterval": -1 + } + }, + "channel_parameters": [ + { + "key": "env", + "required": false + } + ], "compositions": [ { "id": "DecomposedTestStub", "transport": "DecomposedTestTransport", "usermodel": "DecomposedTestUserModel", - "encodings": ["DecomposedTestEncoding"] + "encodings": ["DecomposedTestStubEncoding"] } ] } diff --git a/test/common/plugins/myOS/myArch/DecomposedTestImplementation/CMakeLists.txt b/test/common/plugins/myOS/myArch/DecomposedTestImplementation/CMakeLists.txt deleted file mode 100644 index 8f02d67..0000000 --- a/test/common/plugins/myOS/myArch/DecomposedTestImplementation/CMakeLists.txt +++ /dev/null @@ -1,64 +0,0 @@ - -# Copyright 2023 Two Six Technologies -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - - -function(setup_component_target) - set(OPTIONS "") - set(ONE_VALUE_ARGS TARGET) - set(MULTI_VALUE_ARGS SOURCES) - cmake_parse_arguments(COMPONENT "${OPTIONS}" "${ONE_VALUE_ARGS}" "${MULTI_VALUE_ARGS}" ${ARGN}) - - add_library(${COMPONENT_TARGET} SHARED ${COMPONENT_SOURCES}) - target_include_directories( - ${COMPONENT_TARGET} - PRIVATE - $ - $ - $ - ) - - # TODO enable performance-* and readability-* checks (needs SDK fixes) - setup_clang_tidy_for_target(TARGET ${COMPONENT_TARGET}) - setup_cppcheck_for_target( - TARGET ${COMPONENT_TARGET} - CHECKS all - SUPPRESS unmatchedSuppression unusedFunction missingIncludeSystem - ) - # TODO fix issue with multiple check_format targets - # setup_clang_format_for_target(${COMPONENT_TARGET} PARENT raceboat) - - add_custom_command(TARGET ${COMPONENT_TARGET} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/manifest.json ${CMAKE_CURRENT_BINARY_DIR}/ - ) -endfunction() - -setup_component_target( - TARGET DecomposedTestEncodingImplementation - SOURCES - DecomposedTestEncoding.cpp -) - -setup_component_target( - TARGET DecomposedTestUserModelImplementation - SOURCES - DecomposedTestUserModel.cpp -) - -setup_component_target( - TARGET DecomposedTestTransportImplementation - SOURCES - DecomposedTestTransport.cpp -) diff --git a/test/common/plugins/myOS/myArch/DecomposedTestImplementation/DecomposedTestEncoding.cpp b/test/common/plugins/myOS/myArch/DecomposedTestImplementation/DecomposedTestEncoding.cpp deleted file mode 100644 index a2a2c8f..0000000 --- a/test/common/plugins/myOS/myArch/DecomposedTestImplementation/DecomposedTestEncoding.cpp +++ /dev/null @@ -1,73 +0,0 @@ - -// Copyright 2023 Two Six Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include -#include - -#define TRACE_METHOD(...) TRACE_METHOD_BASE(DecomposedTestEncoding, ##__VA_ARGS__) - -class DecomposedTestEncoding : public IEncodingComponent { -public: - explicit DecomposedTestEncoding(IEncodingSdk *sdk) : sdk(sdk) { - TRACE_METHOD(); - sdk->updateState(COMPONENT_STATE_STARTED); - } - - virtual ComponentStatus onUserInputReceived(RaceHandle /* handle */, bool /* answered */, - const std::string & /* response */) override { - TRACE_METHOD(); - return COMPONENT_OK; - } - - virtual EncodingProperties getEncodingProperties() override { - TRACE_METHOD(); - return {0, "application/octet-stream"}; - } - - virtual SpecificEncodingProperties getEncodingPropertiesForParameters( - const EncodingParameters & /* params */) override { - TRACE_METHOD(); - return {1000000}; - } - - virtual ComponentStatus encodeBytes(RaceHandle handle, const EncodingParameters & /* params */, - const std::vector &bytes) override { - TRACE_METHOD(bytes.size()); - sdk->onBytesEncoded(handle, bytes, ENCODE_OK); - return COMPONENT_OK; - } - - virtual ComponentStatus decodeBytes(RaceHandle handle, - const EncodingParameters & /* params */, - const std::vector & bytes) override { - TRACE_METHOD(bytes.size()); - sdk->onBytesDecoded(handle, bytes, ENCODE_OK); - return COMPONENT_OK; - } - -private: - IEncodingSdk *sdk; -}; - -IEncodingComponent *createEncoding(const std::string & /* encoding */, IEncodingSdk *sdk, - const std::string & /* roleName */, - const PluginConfig & /* pluginConfig */) { - return new DecomposedTestEncoding(sdk); -} - -void destroyEncoding(IEncodingComponent *component) { - delete component; -} diff --git a/test/common/plugins/myOS/myArch/DecomposedTestImplementation/DecomposedTestTransport.cpp b/test/common/plugins/myOS/myArch/DecomposedTestImplementation/DecomposedTestTransport.cpp deleted file mode 100644 index 3cff805..0000000 --- a/test/common/plugins/myOS/myArch/DecomposedTestImplementation/DecomposedTestTransport.cpp +++ /dev/null @@ -1,239 +0,0 @@ - -// Copyright 2023 Two Six Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include -#include - -#include -#include - -using nlohmann::json; - -#define TRACE_METHOD(...) TRACE_METHOD_BASE(DecomposedTestTransport, ##__VA_ARGS__) - -// using a singleton for inter-transport communication because this is a test and there's no good -// way around it -static std::mutex mutex; -static std::unordered_map &sdkMap() { - static std::unordered_map map; - return map; -} - -LinkProperties createDefaultLinkProperties(const ChannelProperties &channelProperties) { - LinkProperties linkProperties; - - linkProperties.linkType = LT_BIDI; - linkProperties.transmissionType = channelProperties.transmissionType; - linkProperties.connectionType = channelProperties.connectionType; - linkProperties.sendType = channelProperties.sendType; - linkProperties.reliable = channelProperties.reliable; - linkProperties.isFlushable = channelProperties.isFlushable; - linkProperties.duration_s = channelProperties.duration_s; - linkProperties.period_s = channelProperties.period_s; - linkProperties.mtu = channelProperties.mtu; - - LinkPropertySet worstLinkPropertySet; - worstLinkPropertySet.bandwidth_bps = 277200; - worstLinkPropertySet.latency_ms = 3190; - worstLinkPropertySet.loss = 0.1; - linkProperties.worst.send = worstLinkPropertySet; - linkProperties.worst.receive = worstLinkPropertySet; - - linkProperties.expected = channelProperties.creatorExpected; - - LinkPropertySet bestLinkPropertySet; - bestLinkPropertySet.bandwidth_bps = 338800; - bestLinkPropertySet.latency_ms = 2610; - bestLinkPropertySet.loss = 0.1; - linkProperties.best.send = bestLinkPropertySet; - linkProperties.best.receive = bestLinkPropertySet; - - linkProperties.supported_hints = channelProperties.supported_hints; - linkProperties.channelGid = channelProperties.channelGid; - - return linkProperties; -} - -class DecomposedTestTransport : public ITransportComponent { -public: - explicit DecomposedTestTransport(ITransportSdk *sdk) : - sdk(sdk), - id(instances++), - channelProperties(sdk->getChannelProperties()), - linkProperties(createDefaultLinkProperties(channelProperties)) { - // store sdk for testing purposes - { - RaceLog::logInfo("DecomposedTestTransport", "Setting sdk for ID: " + std::to_string(id), ""); - std::lock_guard lock (mutex); - sdkMap()[id] = sdk; - } - - // no user input required for the stub. If user input is required, this should be done in - // onUserInputReceived after receiving responses for all requests - sdk->updateState(COMPONENT_STATE_STARTED); - } - - ~DecomposedTestTransport() { - RaceLog::logInfo("DecomposedTestTransport", "Removing sdk for ID: " + std::to_string(id), ""); - std::lock_guard lock (mutex); - sdkMap()[id] = nullptr; - } - - virtual ComponentStatus onUserInputReceived(RaceHandle /* handle */, bool /* answered */, - const std::string & /* response */) override { - TRACE_METHOD(); - return COMPONENT_OK; - } - - virtual TransportProperties getTransportProperties() override { - TRACE_METHOD(); - return { - // supportedActions - { - // action name, type of content associated with action - {"post", {"*/*"}}, - }, - }; - } - - virtual LinkProperties getLinkProperties(const LinkID &linkId) override { - TRACE_METHOD(); - LinkProperties props; - props.linkAddress = json({{"id", id}, {"linkId", linkId}}).dump(); - return props; - } - - virtual ComponentStatus createLink(RaceHandle handle, const LinkID &linkId) override { - TRACE_METHOD(); - sdk->onLinkStatusChanged(handle, linkId, LINK_CREATED, {}); - return COMPONENT_OK; - } - - virtual ComponentStatus loadLinkAddress(RaceHandle handle, const LinkID &linkId, - const std::string &linkAddress) override { - TRACE_METHOD(); - try { - json address = json::parse(linkAddress); - int targetId = address.at("id"); - LinkID recvLinkId = address.at("linkId"); - - linkTargetLinkMap[linkId] = recvLinkId; - { - RaceLog::logInfo("DecomposedTestTransport", "Getting sdk for ID: " + std::to_string(targetId), ""); - RaceLog::logInfo("DecomposedTestTransport", "Storing sdk for Link: " + linkId, ""); - RaceLog::logInfo("DecomposedTestTransport", "Storing linkId " + recvLinkId + " for Link: " + linkId, ""); - std::lock_guard lock (mutex); - linkTargetSdkMap[linkId] = sdkMap().at(targetId); - } - sdk->onLinkStatusChanged(handle, linkId, LINK_LOADED, {}); - return COMPONENT_OK; - } catch (std::exception &e) { - sdk->onLinkStatusChanged(handle, linkId, LINK_DESTROYED, {}); - return COMPONENT_ERROR; - } - } - - virtual ComponentStatus loadLinkAddresses( - RaceHandle handle, const LinkID &linkId, - const std::vector & /* linkAddress */) override { - TRACE_METHOD(); - sdk->onLinkStatusChanged(handle, linkId, LINK_DESTROYED, {}); - return COMPONENT_ERROR; - } - - virtual ComponentStatus createLinkFromAddress(RaceHandle handle, const LinkID &linkId, - const std::string &linkAddress) override { - TRACE_METHOD(); - if (id == std::stoi(linkAddress)) { - sdk->onLinkStatusChanged(handle, linkId, LINK_CREATED, {}); - return COMPONENT_OK; - } else { - return COMPONENT_ERROR; - } - } - - virtual ComponentStatus destroyLink(RaceHandle handle, const LinkID &linkId) override { - TRACE_METHOD(); - linkTargetLinkMap.erase(linkId); - linkTargetSdkMap.erase(linkId); - sdk->onLinkStatusChanged(handle, linkId, LINK_DESTROYED, {}); - return COMPONENT_OK; - } - - virtual std::vector getActionParams(const Action &action) override { - // TRACE_METHOD(); - return {{action.json, "*/*", true, {}}}; - } - - virtual ComponentStatus enqueueContent(const EncodingParameters & /* params */, - const Action &action, - const std::vector &content) override { - TRACE_METHOD(); - contentQueue[action.actionId] = content; - return COMPONENT_OK; - } - - virtual ComponentStatus dequeueContent(const Action &action) override { - TRACE_METHOD(); - contentQueue.erase(action.actionId); - return COMPONENT_OK; - } - - virtual ComponentStatus doAction(const std::vector &handles, - const Action &action) override { - TRACE_METHOD(); - std::vector message = std::move(contentQueue[action.actionId]); - LinkID linkId = action.json; - ITransportSdk *targetSdk = linkTargetSdkMap[linkId]; - LinkID recvLinkId = linkTargetLinkMap[linkId]; - - for (auto &handle : handles) { - sdk->onPackageStatusChanged(handle, PACKAGE_SENT); - } - RaceLog::logInfo("DecomposedTestTransport", "Using sdk for ID: " + linkId, ""); - if (targetSdk && !message.empty()) { - RaceLog::logInfo("DecomposedTestTransport", "Sending message: " + linkId, ""); - targetSdk->onReceive(recvLinkId, {"", "*/*", false, {}}, message); - } - return COMPONENT_OK; - } - -private: - static int instances; - ITransportSdk *sdk; - int id; - ChannelProperties channelProperties; - LinkProperties linkProperties; - - // map link to the destination sdk - std::unordered_map linkTargetLinkMap; - std::unordered_map linkTargetSdkMap; - - // content queue - std::unordered_map> contentQueue; -}; - -int DecomposedTestTransport::instances = 0; - -ITransportComponent *createTransport(const std::string & /* transport */, ITransportSdk *sdk, - const std::string & /* roleName */, - const PluginConfig & /* pluginConfig */) { - return new DecomposedTestTransport(sdk); -} - -void destroyTransport(ITransportComponent *component) { - delete component; -} diff --git a/test/common/plugins/myOS/myArch/DecomposedTestImplementation/DecomposedTestUserModel.cpp b/test/common/plugins/myOS/myArch/DecomposedTestImplementation/DecomposedTestUserModel.cpp deleted file mode 100644 index 5e63b45..0000000 --- a/test/common/plugins/myOS/myArch/DecomposedTestImplementation/DecomposedTestUserModel.cpp +++ /dev/null @@ -1,91 +0,0 @@ - -// Copyright 2023 Two Six Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include -#include - -#include - -#define TRACE_METHOD(...) TRACE_METHOD_BASE(DecomposedTestUserModel, ##__VA_ARGS__) - -class DecomposedTestUserModel : public IUserModelComponent { -public: - explicit DecomposedTestUserModel(IUserModelSdk *sdk) : sdk(sdk), actionId(0) { - TRACE_METHOD(); - sdk->updateState(COMPONENT_STATE_STARTED); - } - - virtual ComponentStatus onUserInputReceived(RaceHandle /* handle */, bool /* answered */, - const std::string & /* response */) override { - TRACE_METHOD(); - return COMPONENT_OK; - } - - virtual UserModelProperties getUserModelProperties() override { - // TRACE_METHOD(); - - return UserModelProperties{10, 5}; - } - - virtual ComponentStatus addLink(const LinkID &link, - const LinkParameters & /* params */) override { - TRACE_METHOD(link); - links.insert(link); - sdk->onTimelineUpdated(); - return COMPONENT_OK; - } - - virtual ComponentStatus removeLink(const LinkID &link) override { - TRACE_METHOD(link); - links.erase(link); - sdk->onTimelineUpdated(); - return COMPONENT_OK; - } - - virtual ActionTimeline getTimeline(Timestamp start, Timestamp end) override { - TRACE_METHOD(start, end); - return {}; - } - - virtual ActionTimeline onSendPackage(const LinkID &linkId, int /* bytes */)override { - Action action; - action.actionId = actionId++; - action.timestamp = 0; - action.json = linkId; - return {action}; - }; - - virtual ComponentStatus onTransportEvent(const Event & /* event */) override { - TRACE_METHOD(); - return COMPONENT_OK; - } - -private: - IUserModelSdk *sdk; - - std::unordered_set links; - uint64_t actionId; -}; - -IUserModelComponent *createUserModel(const std::string & /* usermodel */, IUserModelSdk *sdk, - const std::string & /* roleName */, - const PluginConfig & /* pluginConfig */) { - return new DecomposedTestUserModel(sdk); -} - -void destroyUserModel(IUserModelComponent *component) { - delete component; -} diff --git a/test/common/plugins/myOS/myArch/DecomposedTestImplementation/manifest.json b/test/common/plugins/myOS/myArch/DecomposedTestImplementation/manifest.json deleted file mode 100644 index cfa7a17..0000000 --- a/test/common/plugins/myOS/myArch/DecomposedTestImplementation/manifest.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "plugins": [ - { - "file_path": "DecomposedTestImplementation", - "plugin_type": "comms", - "file_type": "shared_library", - "node_type": "any", - "shared_library_path": "libDecomposedTestEncodingImplementation.so", - "encodings": ["DecomposedTestEncoding"] - }, - { - "file_path": "DecomposedTestImplementation", - "plugin_type": "comms", - "file_type": "shared_library", - "node_type": "any", - "shared_library_path": "libDecomposedTestUserModelImplementation.so", - "usermodels": ["DecomposedTestUserModel"] - }, - { - "file_path": "DecomposedTestImplementation", - "plugin_type": "comms", - "file_type": "shared_library", - "node_type": "any", - "shared_library_path": "libDecomposedTestTransportImplementation.so", - "transports": ["DecomposedTestTransport"] - } - ], - "channel_properties": { - "DecomposedTestImplementation": { - "bootstrap": false, - "channelGid": "DecomposedTestImplementation", - "connectionType": "CT_INDIRECT", - "creatorExpected": { - "send": { - "bandwidth_bps": 277200, - "latency_ms": 3190, - "loss": 0.1 - }, - "receive": { - "bandwidth_bps": 277200, - "latency_ms": 3190, - "loss": 0.1 - } - }, - "description": "Implementation of a decomposed plugin for single process testing", - "duration_s": -1, - "linkDirection": "LD_BIDI", - "loaderExpected": { - "send": { - "bandwidth_bps": 277200, - "latency_ms": 3190, - "loss": 0.1 - }, - "receive": { - "bandwidth_bps": 277200, - "latency_ms": 3190, - "loss": 0.1 - } - }, - "mtu": -1, - "multiAddressable": false, - "period_s": -1, - "reliable": false, - "isFlushable": false, - "sendType": "ST_STORED_ASYNC", - "supported_hints": ["polling_interval_ms", "after"], - "transmissionType": "TT_MULTICAST", - "maxLinks": 1000, - "creatorsPerLoader": -1, - "loadersPerCreator": -1, - "roles": [ - { - "roleName": "default", - "mechanicalTags": [], - "behavioralTags": [], - "linkSide": "LS_BOTH" - } - ], - "maxSendsPerInterval": -1, - "secondsPerInterval": -1, - "intervalEndTime": 0, - "sendsRemainingInInterval": -1 - } - }, - "compositions": [ - { - "id": "DecomposedTestImplementation", - "transport": "DecomposedTestTransport", - "usermodel": "DecomposedTestUserModel", - "encodings": ["DecomposedTestEncoding"] - } - ], - "channel_parameters": [] -} diff --git a/test/source/IntegrationTest.cpp b/test/source/IntegrationTest.cpp index 3cec7ba..d582418 100644 --- a/test/source/IntegrationTest.cpp +++ b/test/source/IntegrationTest.cpp @@ -32,16 +32,16 @@ using testing::Return; struct IntegrationFileSystem : public FileSystem { IntegrationFileSystem(const fs::path &path) : FileSystem(path) {} - virtual const char *getHostArch() { return "myArch"; } - virtual const char *getHostOsType() { return "myOS"; } + virtual const char *getHostArch() { return ""; } + virtual const char *getHostOsType() { return ""; } }; struct IntegrationCore : public Core { IntegrationCore(const fs::path &path, const ChannelParamStore ¶ms) - : Core("", params), integrationFS(IntegrationFileSystem(path)) { - helper::logDebug("path:" + path.string()); - helper::logDebug("plugin path:" + getFS().pluginsInstallPath.string()); - init(); + : Core(path, params), integrationFS(IntegrationFileSystem(path)) { + helper::logInfo("path:" + path.string()); + helper::logInfo("plugin path:" + getFS().pluginsInstallPath.string()); + // init(); } virtual FileSystem &getFS() override { return integrationFS; } @@ -63,14 +63,16 @@ TEST(IntegrationTest, oneshot) { auto stub_path = std::filesystem::path(DECOMPOSED_IMPLEMENTATION); auto plugin_path = stub_path.parent_path() - .parent_path() - .parent_path() - .parent_path() .parent_path(); + helper::logInfo("stub_path:" + stub_path.string()); + helper::logInfo("plugin_path:" + plugin_path.string()); + + auto core = std::make_shared(plugin_path.string(), params); Race race(core); // Race race(plugin_path.string(), params); + helper::logInfo("CORE INSTANTIATED"); ReceiveOptions opt; opt.recv_channel = "DecomposedTestImplementation"; @@ -93,9 +95,6 @@ TEST(IntegrationTest, oneshot) { auto stub_path = std::filesystem::path(DECOMPOSED_IMPLEMENTATION); auto plugin_path = stub_path.parent_path() - .parent_path() - .parent_path() - .parent_path() .parent_path(); auto core = std::make_shared(plugin_path.string(), params); Race race(core); @@ -131,9 +130,6 @@ TEST(IntegrationTest, bidi) { auto stub_path = std::filesystem::path(DECOMPOSED_IMPLEMENTATION); auto plugin_path = stub_path.parent_path() - .parent_path() - .parent_path() - .parent_path() .parent_path(); auto core = std::make_shared(plugin_path.string(), params); @@ -166,9 +162,6 @@ TEST(IntegrationTest, bidi) { auto stub_path = std::filesystem::path(DECOMPOSED_IMPLEMENTATION); auto plugin_path = stub_path.parent_path() - .parent_path() - .parent_path() - .parent_path() .parent_path(); auto core = std::make_shared(plugin_path.string(), params); @@ -209,9 +202,6 @@ TEST(IntegrationTest, connect) { auto stub_path = std::filesystem::path(DECOMPOSED_IMPLEMENTATION); auto plugin_path = stub_path.parent_path() - .parent_path() - .parent_path() - .parent_path() .parent_path(); auto core = std::make_shared(plugin_path.string(), params); @@ -258,9 +248,6 @@ TEST(IntegrationTest, connect) { auto stub_path = std::filesystem::path(DECOMPOSED_IMPLEMENTATION); auto plugin_path = stub_path.parent_path() - .parent_path() - .parent_path() - .parent_path() .parent_path(); auto core = std::make_shared(plugin_path.string(), params); Race race(core); @@ -280,4 +267,4 @@ TEST(IntegrationTest, connect) { thread1.join(); thread2.join(); -} \ No newline at end of file +}