Commit 751b736d authored by Mike Grüne's avatar Mike Grüne

Add Test to gitlab-ci.yml

parent d6433836
Pipeline #166874 failed with stages
in 20 minutes and 13 seconds
......@@ -33,6 +33,14 @@ DeployJobLinux:
only:
- master
MqttIntegrationJob:
stage: integration
image: registry.git.rwth-aachen.de/monticore/embeddedmontiarc/generators/emam2mqtt
dependencies:
- CompileJobLinux
script:
- ./src/test/bash/integrationTestMqtt.sh
RosIntegrationJob:
stage: integration
image: registry.git.rwth-aachen.de/monticore/embeddedmontiarc/generators/emam2middleware/ema-ros-kinetic
......
#!/bin/bash
set -e
baseDir=$(readlink -f `dirname $0`/../../..)
for f in `find $baseDir/target/generated-sources-mqtt/ -name compile.sh`
do
bash -H $f
done
......@@ -25,62 +25,10 @@ public class MqttGenerationTest extends AbstractSymtabTest {
assertNotNull(componentInstanceSymbol);
DistributedTargetGenerator distributedTargetGenerator = new DistributedTargetGenerator();-
DistributedTargetGenerator distributedTargetGenerator = new DistributedTargetGenerator();
distributedTargetGenerator.setGenerationTargetPath(OUT_BASE + "compA/src");
distributedTargetGenerator.add(new CPPGenImpl(TEST_PATH),"cpp");
distributedTargetGenerator.add(new MqttGenImpl(), "mqtt");
List<File> files = distributedTargetGenerator.generate(componentInstanceSymbol, taggingResolver);
}
@Test
public void testBaSystem() throws IOException {
TaggingResolver taggingResolver = createSymTabAndTaggingResolver(TEST_PATH);
RosToEmamTagSchema.registerTagTypes(taggingResolver);
EMAComponentInstanceSymbol componentInstanceSymbol = taggingResolver.<EMAComponentInstanceSymbol>resolve("ba.system", EMAComponentInstanceSymbol.KIND).orElse(null);
assertNotNull(componentInstanceSymbol);
DistributedTargetGenerator distributedTargetGenerator = new DistributedTargetGenerator();
String generationTargetPath = OUT_BASE + "system/src/";
distributedTargetGenerator.setGenerationTargetPath(generationTargetPath);
//distributedTargetGenerator.setGenDebug(true);
distributedTargetGenerator.add(new CPPGenImpl(TEST_PATH), "cpp");
distributedTargetGenerator.add(new MqttGenImpl(), "mqtt");
List<File> files = distributedTargetGenerator.generate(componentInstanceSymbol, taggingResolver);
}
@Test
public void testDistributedTargetGenerator() throws IOException {
TaggingResolver taggingResolver = createSymTabAndTaggingResolver(TEST_PATH);
RosToEmamTagSchema.registerTagTypes(taggingResolver);
EMAComponentInstanceSymbol componentInstanceSymbol = taggingResolver.<EMAComponentInstanceSymbol>resolve("tests.dist.distComp", EMAComponentInstanceSymbol.KIND).orElse(null);
assertNotNull(componentInstanceSymbol);
DistributedTargetGenerator distributedTargetGenerator = new DistributedTargetGenerator();
distributedTargetGenerator.setGenerationTargetPath(OUT_BASE + "distributed/src/");
distributedTargetGenerator.add(new CPPGenImpl(TEST_PATH), "cpp");
distributedTargetGenerator.add(new MqttGenImpl(), "mqtt");
distributedTargetGenerator.generate(componentInstanceSymbol, taggingResolver);
}
@Test
public void testDistributedStructTargetGenerator() throws IOException {
TaggingResolver taggingResolver = createSymTabAndTaggingResolver(TEST_PATH);
RosToEmamTagSchema.registerTagTypes(taggingResolver);
EMAComponentInstanceSymbol componentInstanceSymbol = taggingResolver.<EMAComponentInstanceSymbol>resolve("tests.dist.distWithStructComp", EMAComponentInstanceSymbol.KIND).orElse(null);
assertNotNull(componentInstanceSymbol);
DistributedTargetGenerator distributedTargetGenerator = new DistributedTargetGenerator();
distributedTargetGenerator.setGenerationTargetPath(OUT_BASE + "distributedStruct/src/");
distributedTargetGenerator.add(new CPPGenImpl(TEST_PATH), "cpp");
distributedTargetGenerator.add(new MqtttGenImpl(), "mqtt");
distributedTargetGenerator.generate(componentInstanceSymbol, taggingResolver);
}
}
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