Disable certain tests when analyzed classes are in a jar file.
These tests create FileModules for certain class / source files, and hence assume those files are sitting in the filesystem. We should come up with a better fix here.
This commit is contained in:
parent
b23756924e
commit
9bc5bcbb3c
|
@ -118,6 +118,7 @@ public class CallGraphTest extends WalaTestCase {
|
|||
}
|
||||
|
||||
@Test public void testHello() throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException {
|
||||
if (analyzingJar()) return;
|
||||
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope(TestConstants.HELLO, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
Iterable<Entrypoint> entrypoints = com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope, cha,
|
||||
|
@ -186,6 +187,7 @@ public class CallGraphTest extends WalaTestCase {
|
|||
}
|
||||
|
||||
@Test public void testHelloAllEntrypoints() throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException {
|
||||
if (analyzingJar()) return;
|
||||
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope(TestConstants.HELLO, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
Iterable<Entrypoint> entrypoints = new AllApplicationEntrypoints(scope, cha);
|
||||
|
|
|
@ -33,6 +33,7 @@ public class SourceMapTest extends WalaTestCase {
|
|||
private final static String CLASS_IN_PRIMORDIAL_JAR = "Lcom/ibm/wala/model/SyntheticFactory";
|
||||
|
||||
@Test public void testHello() throws ClassHierarchyException, IOException {
|
||||
if (analyzingJar()) return;
|
||||
AnalysisScope scope = null;
|
||||
scope = AnalysisScopeReader.readJavaScope(TestConstants.HELLO, null, MY_CLASSLOADER);
|
||||
// TODO: it's annoying to have to build a class hierarchy here.
|
||||
|
@ -47,6 +48,7 @@ public class SourceMapTest extends WalaTestCase {
|
|||
}
|
||||
|
||||
@Test public void testFromJar() throws ClassHierarchyException, IOException {
|
||||
if (analyzingJar()) return;
|
||||
AnalysisScope scope = null;
|
||||
scope = AnalysisScopeReader.readJavaScope(TestConstants.HELLO, null, MY_CLASSLOADER);
|
||||
// TODO: it's annoying to have to build a class hierarchy here.
|
||||
|
|
|
@ -34,6 +34,9 @@ public abstract class WalaTestCase {
|
|||
}
|
||||
}
|
||||
|
||||
public static boolean analyzingJar() {
|
||||
return "true".equals(System.getProperty("com.ibm.wala.junit.analyzingJar"));
|
||||
}
|
||||
/*
|
||||
* @see junit.framework.TestCase#setUp()
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue