use of net.praqma.jenkins.memorymap.parser.gcc.GccMemoryMapParser in project memory-map-plugin by Praqma.
the class GccMemoryMapParserIT method gcc432_testUsageValues.
@Test
public void gcc432_testUsageValues() throws Exception {
MemoryMapGraphConfiguration graphConfiguration = new MemoryMapGraphConfiguration(".text+.rodata", "432");
GccMemoryMapParser parser = createParser(graphConfiguration);
parser.setMapFile("prom2_432.map");
parser.setConfigurationFile("prom432.ld");
HashMap<String, String> expectedValues = new HashMap<>();
expectedValues.put(".text", "0x10a008");
expectedValues.put(".rodata", "0x33fd7");
TestUtils.testUsageValues(jenkins, parser, "gcc432.zip", expectedValues);
}
use of net.praqma.jenkins.memorymap.parser.gcc.GccMemoryMapParser in project memory-map-plugin by Praqma.
the class GccMemoryMapParserIT method gcc482_testUsageValues.
@Test
public void gcc482_testUsageValues() throws Exception {
MemoryMapGraphConfiguration graphConfiguration = new MemoryMapGraphConfiguration(".prom_text+.ram_data", "482");
GccMemoryMapParser parser = createParser(graphConfiguration);
parser.setMapFile("gcc482.map");
parser.setConfigurationFile("prom482.ld");
HashMap<String, String> expectedValues = new HashMap<>();
expectedValues.put(".prom_text", "0x10cb70");
expectedValues.put(".ram_data", "0x20c4");
TestUtils.testUsageValues(jenkins, parser, "gcc482.zip", expectedValues);
}
use of net.praqma.jenkins.memorymap.parser.gcc.GccMemoryMapParser in project memory-map-plugin by Praqma.
the class JENKINS_29052_IT method succeedsWithoutGraphs.
@Test
public void succeedsWithoutGraphs() throws Exception {
GccMemoryMapParser parser = createParser();
parser.setMapFile("gcc482.map");
parser.setConfigurationFile("prom482.ld");
FreeStyleProject project = TestUtils.createProject(jenkins);
TestUtils.prepareProjectWorkspace(project, "gcc482.zip");
TestUtils.setMemoryMapConfiguration(project, parser);
FreeStyleBuild build = TestUtils.runNewBuild(project);
TestUtils.printBuildConsoleLog(build, jenkins);
jenkins.assertBuildStatus(Result.SUCCESS, build);
}
use of net.praqma.jenkins.memorymap.parser.gcc.GccMemoryMapParser in project memory-map-plugin by Praqma.
the class MemoryMapGccParserTest method testAssertCorrectExceptionThrown.
@Test
public void testAssertCorrectExceptionThrown() throws Exception {
String illegalAmountOfMemory = "MEMORY/*" + "" + "" + "*/\n" + " {\n" + " /* start comment */\n" + " /* start line comment */ reserved1 (!A) : ORIGIN = 0, LENGTH = 0xÅP\n" + " application (rx) : ORIGIN = 0x100000, LENGTH = 2M\n" + " reserved2 (!A) : ORI/**/GIN = 0x03/* ***** */00000, LENGTH = 0x04ÅN /* COMMENT */\n" + " ram (w) : ORIGIN = 0x0800000, LENGTH = 2M /* 0x04FFFFF */\n" + " /* more " + "comment */\n" + " }";
thrown.expect(AbortException.class);
thrown.expectMessage("Unable to convert 0xÅP to a valid hex string.");
GccMemoryMapParser parser = new GccMemoryMapParser();
parser.getMemory(illegalAmountOfMemory);
}
use of net.praqma.jenkins.memorymap.parser.gcc.GccMemoryMapParser in project memory-map-plugin by Praqma.
the class MemoryMapJobDslContext method parser.
public void parser(String parserType, String parserUniqueName, String commandFile, String mapFile, Runnable closure) {
checkArgument(parserTypes.contains(parserType), "Parser type must be one of " + parserTypes);
MemoryMapParserDslContext context = new MemoryMapParserDslContext();
executeInContext(closure, context);
AbstractMemoryMapParser parser = null;
switch(parserType) {
case "GCC":
parser = new GccMemoryMapParser(parserUniqueName, mapFile, commandFile, wordSize, showBytesOnGraphs, context.graphConfigurations);
break;
case "TI":
parser = new TexasInstrumentsMemoryMapParser(parserUniqueName, mapFile, commandFile, wordSize, context.graphConfigurations, showBytesOnGraphs);
break;
default:
System.out.println("Unable to allocate parser: " + parserType);
break;
}
if (parser != null) {
parser.setParserTitle(context.parserTitle);
parsers.add(parser);
}
}
Aggregations