Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit f471e5b

Browse files
committed
Allowing to choose the subsystem type
Currently the subsystem type used by the functional test framework is always "Virtual". This patch provides the ability to change it. Signed-off-by: Thomas Cahuzac <[email protected]>
1 parent 5556519 commit f471e5b

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

test/functional-tests/include/Config.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ struct Config {
6767
};
6868
using Plugins = Plugin::Collection;
6969
Plugins plugins;
70+
71+
/** Subsystem type. If empty, virtual subsystem will be used. */
72+
std::string subsystemType;
7073
};
7174

7275
} // parameterFramework

test/functional-tests/include/ConfigFiles.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ class ConfigFiles
4444
public:
4545
ConfigFiles(const Config &config) :
4646
mStructureFile(format(mStructureTemplate,
47-
{ { "instances", config.instances },
48-
{ "components", config.components } })),
47+
{ { "type", config.subsystemType.empty() ?
48+
"Virtual" : config.subsystemType },
49+
{ "instances", config.instances },
50+
{ "components", config.components } })),
4951
mDomainsFile(format(mDomainsTemplate, { { "domains", config.domains } })),
5052
mConfigFile(format(mConfigTemplate,
5153
{ { "structurePath", mStructureFile.getPath() },
@@ -101,7 +103,7 @@ class ConfigFiles
101103
)";
102104
const char *mStructureTemplate = R"(<?xml version='1.0' encoding='UTF-8'?>
103105
<SystemClass Name='test'>
104-
<Subsystem Name='test' Type='Virtual'>
106+
<Subsystem Name='test' Type='{type}'>
105107
<ComponentLibrary>
106108
{components}
107109
</ComponentLibrary>

0 commit comments

Comments
 (0)