mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-25 05:32:14 +00:00
GP-0 corrected DWARFRegisterMappingsTest
This commit is contained in:
parent
5bfa35c34f
commit
d999f1bfc5
@ -15,9 +15,12 @@
|
||||
*/
|
||||
package ghidra.app.util.bin.format.dwarf4.next;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.jdom.JDOMException;
|
||||
import org.junit.Before;
|
||||
@ -25,10 +28,12 @@ import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
import generic.test.category.NightlyCategory;
|
||||
import ghidra.GhidraTestApplicationLayout;
|
||||
import ghidra.program.model.lang.*;
|
||||
import ghidra.program.util.DefaultLanguageService;
|
||||
import ghidra.test.AbstractGhidraHeadlessIntegrationTest;
|
||||
import ghidra.util.xml.XmlUtilities;
|
||||
import utility.application.ApplicationLayout;
|
||||
|
||||
@Category(NightlyCategory.class)
|
||||
public class DWARFRegisterMappingsTest extends AbstractGhidraHeadlessIntegrationTest {
|
||||
@ -41,6 +46,21 @@ public class DWARFRegisterMappingsTest extends AbstractGhidraHeadlessIntegration
|
||||
new LanguageID("x86:LE:32:default"));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ApplicationLayout createApplicationLayout() throws IOException {
|
||||
return new GhidraTestApplicationLayout(new File(getTestDirectoryPath())) {
|
||||
@Override
|
||||
protected Set<String> getDependentModulePatterns() {
|
||||
//@formatter:off
|
||||
String processorModules = "/ghidra/Ghidra/Processors/".replace('/', File.separatorChar);
|
||||
return new HashSet<>(Set.of(
|
||||
processorModules
|
||||
));
|
||||
//@formatter:on
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Test reading the DWARF register mappings for every language that has a DWARF register
|
||||
* mapping file specified in its LDEF file.
|
||||
@ -50,6 +70,7 @@ public class DWARFRegisterMappingsTest extends AbstractGhidraHeadlessIntegration
|
||||
public void testReadMappings() throws IOException {
|
||||
for (LanguageDescription langDesc : DefaultLanguageService.getLanguageService().getLanguageDescriptions(
|
||||
false)) {
|
||||
|
||||
Language lang =
|
||||
DefaultLanguageService.getLanguageService().getLanguage(langDesc.getLanguageID());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user