mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
Add flow-through test case generator
This commit is contained in:
@@ -31,7 +31,7 @@ if os.path.exists(resultJava) or os.path.exists(resultQl):
|
||||
|
||||
workDir = tempfile.mkdtemp()
|
||||
|
||||
# Step 1: make a database that touches all types whose methods we want to test:
|
||||
# Make a database that touches all types whose methods we want to test:
|
||||
print("Creating Maven project")
|
||||
projectDir = os.path.join(workDir, "mavenProject")
|
||||
os.makedirs(projectDir)
|
||||
@@ -138,6 +138,10 @@ with open(resultQl, "w") as f:
|
||||
with open(os.path.join(scriptPath, "testFooter.qlfrag"), "r") as header:
|
||||
shutil.copyfileobj(header, f)
|
||||
|
||||
# Make an empty .expected file, since this is an inline-exectations test
|
||||
with open(os.path.join(sys.argv[3], "test.expected")):
|
||||
pass
|
||||
|
||||
cmd = ['codeql', 'query', 'format', '-qq', '-i', resultQl]
|
||||
subprocess.call(cmd)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user