Skip to content

Commit 3f0b24e

Browse files
committed
look for source/sink definition file locally as well
1 parent 25055c9 commit 3f0b24e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

soot-infoflow-integration/test/soot/jimple/infoflow/integration/test/junit/OutputStreamTests.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
import soot.jimple.infoflow.taintWrappers.ITaintPropagationWrapper;
1313

1414
import javax.xml.stream.XMLStreamException;
15+
16+
import java.io.File;
1517
import java.io.IOException;
1618
import java.util.ArrayList;
1719
import java.util.Collections;
@@ -25,7 +27,12 @@
2527
public class OutputStreamTests extends RiverJUnitTests {
2628
private ISourceSinkManager getSourceSinkManager(IInfoflow infoflow) {
2729
try {
28-
XMLSourceSinkParser parser = XMLSourceSinkParser.fromFile("./build/classes/res/OutputStreamAndWriters.xml");
30+
File sourcesSinks =new File("./build/classes/res/OutputStreamAndWriters.xml");
31+
if (!sourcesSinks.exists())
32+
sourcesSinks = new File("./res/OutputStreamAndWriters.xml");
33+
if (!sourcesSinks.exists())
34+
throw new RuntimeException("Source/sink definition file not found");
35+
XMLSourceSinkParser parser = XMLSourceSinkParser.fromFile(sourcesSinks.getAbsolutePath());
2936
return new SimpleSourceSinkManager(parser.getSources(), parser.getSinks(), infoflow.getConfig());
3037
} catch (IOException e) {
3138
throw new RuntimeException(e);

0 commit comments

Comments
 (0)