use of net.praqma.jenkins.memorymap.result.MemoryMapConfigMemory in project memory-map-plugin by Praqma.
the class MemoryMapRecorder method perform.
@Override
public void perform(@Nonnull Run<?, ?> build, @Nonnull FilePath workspace, @Nonnull Launcher launcher, @Nonnull TaskListener listener) throws InterruptedException, IOException {
PrintStream out = listener.getLogger();
HashMap<String, MemoryMapConfigMemory> config;
Plugin plug = Jenkins.getActiveInstance().getPlugin("memory-map");
if (plug != null)
out.println("Memory Map Plugin version " + plug.getWrapper().getVersion());
try {
config = workspace.act(new MemoryMapConfigFileParserDelegate(getChosenParsers()));
config = workspace.act(new MemoryMapMapParserDelegate(getChosenParsers(), config));
} catch (IOException ex) {
// Catch all known errors (By using a marker interface)
if (ex instanceof MemoryMapError) {
out.println(ex.getMessage());
} else {
out.println("Unspecified error. Writing trace to log");
logger.log(Level.SEVERE, "Abnormal plugin execution, trace written to log", ex);
throw new AbortException(String.format("Unspecified error. Please review error message.%nPlease install the logging plugin to record the standard java logger output stream." + "%nThe plugin is described here: https://wiki.jenkins-ci.org/display/JENKINS/Logging+plugin and requires core 1.483 "));
}
return;
}
out.println("Printing configuration");
if (config != null) {
out.println();
out.println(config.toString());
}
MemoryMapBuildAction buildAction = new MemoryMapBuildAction(build, config);
buildAction.setRecorder(this);
buildAction.setMemoryMapConfigs(config);
buildAction.setChosenParsers(getChosenParsers());
build.addAction(buildAction);
}
use of net.praqma.jenkins.memorymap.result.MemoryMapConfigMemory in project memory-map-plugin by Praqma.
the class MemoryMapGccParserTest method testParsingOfMemorySegmentInLinkerCommandFile.
@Test
public void testParsingOfMemorySegmentInLinkerCommandFile() throws IOException {
GccMemoryMapParser parser = new GccMemoryMapParser();
String fileNameLinker = MemoryMapGccParserTest.class.getResource("prom.ld").getFile();
String fileNameMap = MemoryMapGccParserTest.class.getResource("prom.map").getFile();
assertNotNull(fileNameLinker);
assertNotNull(fileNameMap);
File f = new File(fileNameLinker);
MemoryMapConfigMemory mem = parser.parseConfigFile(f);
File f2 = new File(fileNameMap);
parser.parseMapFile(f2, mem);
}
Aggregations