File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/python3
2
+
1
3
import errno
2
4
import json
3
5
import os
9
11
import sys
10
12
import tempfile
11
13
14
+ if any (s == "--help" for s in sys .argv ):
15
+ print ("""Usage:
16
+ GenerateFlowTestCase.py specsToTest.ssv projectPom.xml outdir
17
+
18
+ This generates test cases exercising taint flow specifications found in specsToTest.ssv
19
+ producing files Test.java, test.ql and test.expected in outdir.
20
+
21
+ projectPom.xml should be a Maven pom sufficient to resolve the classes named in specsToTest.ssv.
22
+ Typically this means supplying a skeleton POM <dependencies> section that retrieves whatever jars
23
+ contain the needed classes.
24
+
25
+ Requirements: `mvn` and `codeql` should both appear on your path.
26
+
27
+ After test generation completes, any lines in specsToTest.ssv that didn't produce tests are output.
28
+ If this happens, check the spelling of class and method names, and the syntax of input and output specifications.
29
+ """ )
30
+ sys .exit (0 )
31
+
12
32
if len (sys .argv ) != 4 :
13
33
print ("Usage: GenerateFlowTestCase.py specsToTest.ssv projectPom.xml outdir" , file = sys .stderr )
14
34
print ("specsToTest.ssv should contain SSV rows describing method taint-propagation specifications to test" , file = sys .stderr )
You can’t perform that action at this time.
0 commit comments