Commit ab67c9ce authored by Georg Vinogradov's avatar Georg Vinogradov

Fix test failures

parent d3145b45
Pipeline #177617 failed with stages
in 22 minutes and 43 seconds
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<Embedded-montiarc-math-roscpp-generator.version>0.1.6-SNAPSHOT</Embedded-montiarc-math-roscpp-generator.version> <Embedded-montiarc-math-roscpp-generator.version>0.1.6-SNAPSHOT</Embedded-montiarc-math-roscpp-generator.version>
<EMADL2CPP.version>0.2.8</EMADL2CPP.version> <EMADL2CPP.version>0.2.8</EMADL2CPP.version>
<EMADL.version>0.2.7-SNAPSHOT</EMADL.version> <EMADL.version>0.2.7-SNAPSHOT</EMADL.version>
<MQTT.version>1.0-SNAPSHOT</MQTT.version> <MQTT.version>1.1-SNAPSHOT</MQTT.version>
<embedded-montiarc-component-clustering.version>0.0.2-SNAPSHOT</embedded-montiarc-component-clustering.version> <embedded-montiarc-component-clustering.version>0.0.2-SNAPSHOT</embedded-montiarc-component-clustering.version>
<!-- .. Libraries .................................................. --> <!-- .. Libraries .................................................. -->
......
package de.monticore.lang.monticar.generator.middleware; package de.monticore.lang.monticar.generator.middleware;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol; import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.ros.RosToEmamTagSchema; import de.monticore.lang.embeddedmontiarc.tagging.middleware.mqtt.MqttConnectionSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.mqtt.MqttToEmamTagSchema;
import de.monticore.lang.monticar.generator.middleware.impls.CPPGenImpl; import de.monticore.lang.monticar.generator.middleware.impls.CPPGenImpl;
import de.monticore.lang.monticar.generator.middleware.impls.MqttGenImpl; import de.monticore.lang.monticar.generator.middleware.impls.MqttGenImpl;
import de.monticore.lang.tagging._symboltable.TaggingResolver; import de.monticore.lang.tagging._symboltable.TaggingResolver;
...@@ -20,15 +21,19 @@ public class MqttGenerationTest extends AbstractSymtabTest { ...@@ -20,15 +21,19 @@ public class MqttGenerationTest extends AbstractSymtabTest {
@Test @Test
public void testMqttGeneration() throws IOException { public void testMqttGeneration() throws IOException {
TaggingResolver taggingResolver = createSymTabAndTaggingResolver(TEST_PATH); TaggingResolver taggingResolver = createSymTabAndTaggingResolver(TEST_PATH);
EMAComponentInstanceSymbol componentInstanceSymbol = taggingResolver.<EMAComponentInstanceSymbol>resolve("tests.a.compA", EMAComponentInstanceSymbol.KIND).orElse(null); MqttToEmamTagSchema.registerTagTypes(taggingResolver);
RosToEmamTagSchema.registerTagTypes(taggingResolver);
EMAComponentInstanceSymbol componentInstanceSymbol = taggingResolver.<EMAComponentInstanceSymbol>resolve("tests.a.compA", EMAComponentInstanceSymbol.KIND).orElse(null);
assertNotNull(componentInstanceSymbol); assertNotNull(componentInstanceSymbol);
componentInstanceSymbol.getPortInstance("portA").orElse(null).setMiddlewareSymbol(new MqttConnectionSymbol("/clock"));
DistributedTargetGenerator distributedTargetGenerator = new DistributedTargetGenerator(); DistributedTargetGenerator distributedTargetGenerator = new DistributedTargetGenerator();
distributedTargetGenerator.setGenerationTargetPath(OUT_BASE + "compA/src"); distributedTargetGenerator.setGenerationTargetPath(OUT_BASE + "compA/src");
distributedTargetGenerator.add(new CPPGenImpl(TEST_PATH),"cpp"); distributedTargetGenerator.add(new CPPGenImpl(TEST_PATH),"cpp"); // Cpp implementation for the component
distributedTargetGenerator.add(new MqttGenImpl(), "mqtt"); distributedTargetGenerator.add(new MqttGenImpl(), "mqtt");
List<File> files = distributedTargetGenerator.generate(componentInstanceSymbol, taggingResolver); List<File> files = distributedTargetGenerator.generate(componentInstanceSymbol, taggingResolver);
} }
} }
...@@ -2,6 +2,7 @@ package tests.a; ...@@ -2,6 +2,7 @@ package tests.a;
component CompA{ component CompA{
port in Q rosIn; port in Q rosIn;
port in Q portA;
port in Q noRosIn; port in Q noRosIn;
port out Q rosOut; port out Q rosOut;
port out Q noRosOut; port out Q noRosOut;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment