Commit 4e15f5cc authored by Markus Georg Bendel's avatar Markus Georg Bendel
Browse files

Fix: create folder before writting files in generate method

parent f73b5e03
Pipeline #175434 failed with stages
in 24 minutes and 23 seconds
...@@ -5,6 +5,7 @@ import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instance ...@@ -5,6 +5,7 @@ import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instance
import de.monticore.lang.embeddedmontiarc.tagging.middleware.ros.RosToEmamTagSchema; import de.monticore.lang.embeddedmontiarc.tagging.middleware.ros.RosToEmamTagSchema;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.someip.SomeIPConnectionSymbol; import de.monticore.lang.embeddedmontiarc.tagging.middleware.someip.SomeIPConnectionSymbol;
import de.monticore.lang.monticar.generator.middleware.impls.CPPGenImpl; import de.monticore.lang.monticar.generator.middleware.impls.CPPGenImpl;
import de.monticore.lang.monticar.generator.someip.GeneratorSomeIP;
import de.monticore.lang.monticar.generator.middleware.impls.SomeIPGenImpl; import de.monticore.lang.monticar.generator.middleware.impls.SomeIPGenImpl;
import de.monticore.lang.tagging._symboltable.TagSymbol; import de.monticore.lang.tagging._symboltable.TagSymbol;
import de.monticore.lang.tagging._symboltable.TaggingResolver; import de.monticore.lang.tagging._symboltable.TaggingResolver;
...@@ -31,13 +32,23 @@ public class SomeIPGenerationTest extends AbstractSymtabTest { ...@@ -31,13 +32,23 @@ public class SomeIPGenerationTest extends AbstractSymtabTest {
assertNotNull(componentInstanceSymbol); assertNotNull(componentInstanceSymbol);
Map<EMAPortSymbol, SomeIPConnectionSymbol> someIPConnectionSymbols = new HashMap<>(); File directory = new File(OUT_BASE + "addComp/src/tests_a_addComp/someip");
componentInstanceSymbol.getPortInstanceList().forEach(p -> { directory.mkdirs();
Collection<TagSymbol> tmpTags = taggingResolver.getTags(p, SomeIPConnectionSymbol.KIND);
if (tmpTags.size() == 1) { GeneratorSomeIP generatorSomeIP = new GeneratorSomeIP();
someIPConnectionSymbols.put(p, (SomeIPConnectionSymbol) tmpTags.iterator().next()); generatorSomeIP.setGenerationTargetPath(OUT_BASE);
} generatorSomeIP.generateSomeIPAdapter(componentInstanceSymbol);
});
componentInstanceSymbol.getPortInstance("in1").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(1,2,3));
//Map<EMAPortSymbol, SomeIPConnectionSymbol> someIPConnectionSymbols = new HashMap<>();
//componentInstanceSymbol.getPortInstanceList().forEach(p -> {
// Collection<TagSymbol> tmpTags = taggingResolver.getTags(p, SomeIPConnectionSymbol.KIND);
// if (tmpTags.size() == 1) {
// someIPConnectionSymbols.put(p, (SomeIPConnectionSymbol) tmpTags.iterator().next());
// }
//});
//EMAPortInstanceSymbol in1 = componentInstanceSymbol.getPortInstance("in1").orElse(null); //EMAPortInstanceSymbol in1 = componentInstanceSymbol.getPortInstance("in1").orElse(null);
//assertNotNull(in1); //assertNotNull(in1);
......
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