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

Commit edb6c97

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 8895f45 commit edb6c97

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-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. Virtual by default. */
72+
std::string subsystemType = "Virtual";
7073
};
7174

7275
} // parameterFramework

test/functional-tests/include/ConfigFiles.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ 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 },
48+
{ "instances", config.instances },
49+
{ "components", config.components } })),
4950
mDomainsFile(format(mDomainsTemplate, { { "domains", config.domains } })),
5051
mConfigFile(format(mConfigTemplate,
5152
{ { "structurePath", mStructureFile.getPath() },
@@ -101,7 +102,7 @@ class ConfigFiles
101102
)";
102103
const char *mStructureTemplate = R"(<?xml version='1.0' encoding='UTF-8'?>
103104
<SystemClass Name='test'>
104-
<Subsystem Name='test' Type='Virtual'>
105+
<Subsystem Name='test' Type='{type}'>
105106
<ComponentLibrary>
106107
{components}
107108
</ComponentLibrary>

0 commit comments

Comments
 (0)