Dispatcher-Pipeline: implement Generation of fake-ExitNodes
...similar to the Generation of complete JobTickets in the initial implementation
This commit is contained in:
parent
f6af4c6a16
commit
0c57a61545
4 changed files with 28 additions and 21 deletions
|
|
@ -11,7 +11,7 @@ return: 0
|
|||
END
|
||||
|
||||
|
||||
PLANNED "Fixture Node-Graph connection" NodeGraphAttachment_test <<END
|
||||
TEST "Fixture Node-Graph connection" NodeGraphAttachment_test <<END
|
||||
return: 0
|
||||
END
|
||||
|
||||
|
|
|
|||
|
|
@ -202,11 +202,12 @@ namespace test {
|
|||
ExitNode
|
||||
buildExitNodeFromSpec (GenNode const& spec)
|
||||
{
|
||||
UNIMPLEMENTED ("rewrite the mock builder code to generate a network of ExitNodes instead of JobTickets");
|
||||
}
|
||||
return ExitNode{buildSeed (spec)
|
||||
,buildPrerequisites (spec)};
|
||||
} // Warning: re-entrant invocation of emplace_back
|
||||
|
||||
|
||||
private: /* ======== Implementation: build mock JobTickes from test specification ==== */
|
||||
private: /* ======== Implementation: build fake ExitNodes from test specification ==== */
|
||||
|
||||
HashVal
|
||||
buildSeed (GenNode const& spec)
|
||||
|
|
@ -215,21 +216,26 @@ namespace test {
|
|||
return seed? HashVal(*seed) : HashVal(rand() % 1000);
|
||||
}
|
||||
|
||||
auto
|
||||
ExitNodes
|
||||
buildPrerequisites (GenNode const& spec)
|
||||
{
|
||||
return lib::transformIterator (spec.getChildren()
|
||||
,[this](GenNode const& childSpec) -> JobTicket&
|
||||
{
|
||||
return buildTicketFromSpec (childSpec);
|
||||
});
|
||||
// return lib::transformIterator (spec.getChildren()
|
||||
// ,[this](GenNode const& childSpec) -> JobTicket&
|
||||
// {
|
||||
// return buildTicketFromSpec (childSpec);
|
||||
// });
|
||||
ExitNodes prerequisites;
|
||||
for (auto& child : spec.getChildren())
|
||||
prerequisites.emplace_back (
|
||||
buildExitNodeFromSpec (child));
|
||||
return prerequisites;
|
||||
}
|
||||
|
||||
JobTicket&
|
||||
buildTicketFromSpec (GenNode const& spec)
|
||||
{
|
||||
return tickets_.emplace_back (buildSeed(spec)
|
||||
,buildPrerequisites(spec));
|
||||
// return tickets_.emplace_back (buildSeed(spec)
|
||||
// ,buildPrerequisites(spec));
|
||||
} // Warning: re-entrant invocation of emplace_back
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ namespace test {
|
|||
|
||||
/** @test setup a properly structured ExitNode graph using the
|
||||
* specification scheme supported by MockSegmentation
|
||||
* @see MockSupport_test::verify_MockSegmentation
|
||||
*/
|
||||
void
|
||||
fabricate_MockExitNode()
|
||||
|
|
@ -123,7 +124,7 @@ namespace test {
|
|||
using lib::diff::MakeRec;
|
||||
|
||||
engine::test::MockSegmentation builder;
|
||||
ExitNode incubus =
|
||||
ExitNode node =
|
||||
builder.buildExitNodeFromSpec(MakeRec()
|
||||
.attrib("mark", 13)
|
||||
.scope(MakeRec()
|
||||
|
|
@ -135,8 +136,8 @@ namespace test {
|
|||
)
|
||||
.genNode());
|
||||
|
||||
CHECK (13 == incubus.getPipelineIdentity());
|
||||
auto feed = incubus.getPrerequisites();
|
||||
CHECK (13 == node.getPipelineIdentity());
|
||||
auto feed = node.getPrerequisites();
|
||||
CHECK (not isnil (feed));
|
||||
CHECK (23 == feed->getPipelineIdentity());
|
||||
++feed;
|
||||
|
|
|
|||
|
|
@ -74096,16 +74096,16 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
<node COLOR="#5b280f" CREATED="1685988037609" ID="ID_1118666398" MODIFIED="1686009850660" TEXT="nun stets eager alle möglichen Duplikate (pro ModelPort) generieren">
|
||||
<icon BUILTIN="button_cancel"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1686009860309" ID="ID_1088673306" MODIFIED="1686090242224" TEXT="Generierung via Mock-ExitNodes">
|
||||
<icon BUILTIN="flag-pink"/>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1686009860309" ID="ID_1088673306" MODIFIED="1686151111541" TEXT="Generierung via Mock-ExitNodes">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node BACKGROUND_COLOR="#f0d5c5" COLOR="#990033" CREATED="1686009877359" ID="ID_224370768" MODIFIED="1686090285802" TEXT="bisheriger Zugang via MockJobTicket fällt praktisch weg">
|
||||
<icon BUILTIN="smiley-angry"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1686009918647" ID="ID_1552363345" MODIFIED="1686091174947" TEXT="Spec nun in Fake-ExitNode(s) übersetzen">
|
||||
<node COLOR="#338800" CREATED="1686009918647" ID="ID_1552363345" MODIFIED="1686151106836" TEXT="Spec nun in Fake-ExitNode(s) übersetzen">
|
||||
<linktarget COLOR="#599eb9" DESTINATION="ID_1552363345" ENDARROW="Default" ENDINCLINATION="623;43;" ID="Arrow_ID_940031570" SOURCE="ID_929102409" STARTARROW="None" STARTINCLINATION="738;-108;"/>
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1686092906718" HGAP="35" ID="ID_515771" MODIFIED="1686102821898" TEXT="NodeGraphAttachment_test" VSHIFT="-3">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node COLOR="#338800" CREATED="1686092906718" HGAP="35" ID="ID_515771" MODIFIED="1686151102329" TEXT="NodeGraphAttachment_test" VSHIFT="-3">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1686011373412" ID="ID_1341039933" MODIFIED="1686090506568" TEXT="Erzeugung läuft nun über den realen JobTicket-ctor">
|
||||
|
|
|
|||
Loading…
Reference in a new issue