21 int lm[2][2] = {{1, 2}, {3, 4}};
25 {
InputSpec{
"foo",
"A",
"COLLISIONCONTEXT", 1, Lifetime::Condition, {
26 ConfigParamSpec{
"aUrl", VariantType::String,
"foo/bar", {
"A InputSpec option"}},
27 ConfigParamSpec{
"bUrl", VariantType::String,
"foo/foo", {
"Another InputSpec option"}},
29 {
OutputSpec{{
"bar"},
"C",
"D", 2, Lifetime::Timeframe}},
35 ConfigParamSpec{
"aString", VariantType::String,
"some string", {
"A String"}},
36 ConfigParamSpec{
"aLabeledArray", VariantType::LabeledArrayInt, labeled, {
"A LabeledArray"}}}},
54 {{
"label a"}, {
"label \"b\""}},
55 {{
"key1",
"v\"al'1"}, {
"",
"val2"}, {
"key3",
""}, {
"",
""}}}};
57 std::vector<DataProcessorInfo> dataProcessorInfoOut{
58 {.name =
"A", .executable =
"test_Framework_test_SerializationWorkflow", .cmdLineArgs = {
"foo"}, .workflowOptions = {
ConfigParamSpec{
"aBool", VariantType::Bool,
true, {
"A Bool"}},
ConfigParamSpec{
"aLabeledArray", VariantType::LabeledArrayInt, labeled, {
"A LabeledArray"}}}},
59 {.
name =
"B", .executable =
"test_Framework_test_SerializationWorkflow", .cmdLineArgs = {
"b-bar",
"bfoof",
"fbdbfaso"}},
60 {.name =
"C", .executable =
"test_Framework_test_SerializationWorkflow"},
61 {.name =
"D", .executable =
"test_Framework_test_SerializationWorkflow"},
64 CommandInfo commandInfoOut{
"o2-dpl-workflow -b --option 1 --option 2"};
66 std::vector<DataProcessorInfo> dataProcessorInfoIn{};
69 std::ostringstream firstDump;
71 std::istringstream is;
72 is.str(firstDump.str());
76 std::ostringstream secondDump;
79 REQUIRE(w0.size() == 4);
80 REQUIRE(w0.size() == w1.size());
81 REQUIRE(firstDump.str() == secondDump.str());
82 REQUIRE(commandInfoIn.
command == commandInfoOut.command);
85 REQUIRE(std::get_if<ConcreteDataMatcher>(&w1[0].inputs[0].matcher) !=
nullptr);
89 REQUIRE(spec.name ==
"aLabeledArray");
90 REQUIRE(spec.type == VariantType::LabeledArrayInt);
92 REQUIRE(la.getLabelsRows() == labeled.getLabelsRows());
93 REQUIRE(la.getLabelsCols() == labeled.getLabelsCols());
94 REQUIRE(la.get(
"r2",
"c1") == 3);
96 checkLabeled(w1[0].options.back());
97 REQUIRE(dataProcessorInfoIn[0].workflowOptions.size() == 2);
98 checkLabeled(dataProcessorInfoIn[0].workflowOptions.back());
109 .inputs = {{
"clbPayload",
"CLP"}, {
"clbWrapper",
"CLW"}},
112 std::vector<DataProcessorInfo> dataProcessorInfoOut{
113 {.name =
"A", .executable =
"test_Framework_test_SerializationWorkflow"},
116 CommandInfo commandInfoOut{
"o2-dpl-workflow -b --option 1 --option 2"};
118 std::vector<DataProcessorInfo> dataProcessorInfoIn{};
121 std::ostringstream firstDump;
123 std::istringstream is;
124 is.str(firstDump.str());
128 std::ostringstream secondDump;
131 REQUIRE(w0.size() == 1);
132 REQUIRE(w0.size() == w1.size());
133 REQUIRE(firstDump.str() == secondDump.str());
134 REQUIRE(commandInfoIn.
command == commandInfoOut.command);
145 .outputs = {
OutputSpec{
OutputLabel{
"o1"},
o2::header::DataOrigin{
"TST"},
"OUTPUT1", 0, Lifetime::Timeframe, {{
"param1", VariantType::Bool,
true,
ConfigParamSpec::HelpString{
"\"\""}}, {
"param2", VariantType::Bool,
true,
ConfigParamSpec::HelpString{
"\"\""}}}},
148 std::vector<DataProcessorInfo> dataProcessorInfoOut{
149 {.name =
"S1", .executable =
"test_Framework_test_SerializationWorkflow"},
154 std::vector<DataProcessorInfo> dataProcessorInfoIn{};
157 std::ostringstream firstDump;
159 std::istringstream is;
160 is.str(firstDump.str());
165 REQUIRE(wsi[0].outputs[0].metadata.size() == 2);
166 REQUIRE(wsi[0].outputs[1].metadata.size() == 0);
167 REQUIRE(wso[0].outputs[0].metadata.size() == wsi[0].outputs[0].metadata.size());
168 REQUIRE(wso[0].outputs[1].metadata.size() == wsi[0].outputs[1].metadata.size());
169 REQUIRE(wso[0].outputs[0].metadata[0] == wsi[0].outputs[0].metadata[0]);
170 REQUIRE(wso[0].outputs[0].metadata[1] == wsi[0].outputs[0].metadata[1]);