speed up some CG tests by disabling reflection handling

We should add some proper unit tests if we really care about how
reflection is handled for these tests; they take way too long to run
This commit is contained in:
Manu Sridharan 2017-06-26 10:33:28 -07:00
parent 469734f61e
commit fbf4ff731d
2 changed files with 6 additions and 1 deletions

View File

@ -21,7 +21,7 @@
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.ibm.wala.core.testdata/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.ibm.wala.core.tests"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx800M -Dcom.ibm.wala.junit.profile=short -ea -Dcom.ibm.wala.fixedpoint.impl.verbose=true"/>

View File

@ -26,6 +26,7 @@ import com.ibm.wala.core.tests.util.WalaTestCase;
import com.ibm.wala.ipa.callgraph.AnalysisCache;
import com.ibm.wala.ipa.callgraph.AnalysisCacheImpl;
import com.ibm.wala.ipa.callgraph.AnalysisOptions;
import com.ibm.wala.ipa.callgraph.AnalysisOptions.ReflectionOptions;
import com.ibm.wala.ipa.callgraph.AnalysisScope;
import com.ibm.wala.ipa.callgraph.CGNode;
import com.ibm.wala.ipa.callgraph.CallGraph;
@ -86,6 +87,8 @@ public class CallGraphTest extends WalaTestCase {
Iterable<Entrypoint> entrypoints = com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope, cha,
TestConstants.BCEL_VERIFIER_MAIN);
AnalysisOptions options = CallGraphTestUtil.makeAnalysisOptions(scope, entrypoints);
// this speeds up the test
options.setReflectionOptions(ReflectionOptions.NONE);
doCallGraphs(options, new AnalysisCacheImpl(), cha, scope);
}
@ -106,6 +109,8 @@ public class CallGraphTest extends WalaTestCase {
ClassHierarchy cha = ClassHierarchyFactory.make(scope);
Iterable<Entrypoint> entrypoints = new AllApplicationEntrypoints(scope, cha);
AnalysisOptions options = CallGraphTestUtil.makeAnalysisOptions(scope, entrypoints);
// this speeds up the test
options.setReflectionOptions(ReflectionOptions.NONE);
doCallGraphs(options, new AnalysisCacheImpl(), cha, scope);