@@ -66,11 +66,16 @@ jobs:
66
66
codeql-home : ${{ github.workspace }}/codeql_home
67
67
add-to-path : false
68
68
69
+ - name : Install CodeQL packs
70
+ uses : ./.github/actions/install-codeql-packs
71
+ with :
72
+ cli_path : ${{ github.workspace }}/codeql_home/codeql
73
+
69
74
- name : Pre-Compile Queries
70
75
id : pre-compile-queries
71
76
run : |
72
- ${{ github.workspace }}/codeql_home/codeql/codeql query compile --search-path cpp -- threads 0 cpp
73
- ${{ github.workspace }}/codeql_home/codeql/codeql query compile --search-path c --search-path cpp -- threads 0 c
77
+ ${{ github.workspace }}/codeql_home/codeql/codeql query compile --threads 0 cpp
78
+ ${{ github.workspace }}/codeql_home/codeql/codeql query compile --threads 0 c
74
79
75
80
76
81
- name : Run test suites
@@ -122,18 +127,11 @@ jobs:
122
127
os.makedirs(os.path.dirname(test_report_path), exist_ok=True)
123
128
test_report_file = open(test_report_path, 'w')
124
129
files_to_close.append(test_report_file)
125
- if "${{ matrix.language }}".casefold() == "c".casefold():
126
- # c tests require cpp -- but we don't want c things on the cpp
127
- # path in case of design errors.
128
- cpp_language_root = Path(workspace, 'cpp')
129
- procs.append(subprocess.Popen([codeql_bin, "test", "run", "--failing-exitcode=122", f"--slice={slice}/{num_slices}", "--ram=2048", "--format=json", f'--search-path={cpp_language_root}', f'--search-path={language_root}', *test_roots], stdout=test_report_file, stderr=subprocess.PIPE))
130
- else:
131
- procs.append(subprocess.Popen([codeql_bin, "test", "run", "--failing-exitcode=122", f"--slice={slice}/{num_slices}", "--ram=2048", "--format=json", f'--search-path={language_root}', f'--search-path={language_root}', *test_roots], stdout=test_report_file, stderr=subprocess.PIPE))
130
+ procs.append(subprocess.Popen([codeql_bin, "test", "run", "--failing-exitcode=122", f"--slice={slice}/{num_slices}", "--ram=2048", "--format=json", *test_roots], stdout=test_report_file, stderr=subprocess.PIPE))
132
131
133
132
for p in procs:
134
- p.wait ()
133
+ _, err = p.communicate ()
135
134
if p.returncode != 0:
136
- _, err = p.communicate()
137
135
if p.returncode == 122:
138
136
# Failed because a test case failed, so just print the regular output.
139
137
# This will allow us to proceed to validate-test-results, which will fail if
0 commit comments