Skip to content

Commit

Permalink
Release v2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rvermeulen committed Jul 13, 2022
1 parent 9fd472d commit 73ac82c
Show file tree
Hide file tree
Showing 385 changed files with 5,784 additions and 1,678 deletions.
1 change: 0 additions & 1 deletion .github/workflows/code-scanning-pack-gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ jobs:
mkdir -p "$query_dir"
# Copy each selected ql file, plus the related files (qhelp, qhelp implementation)
cp "$copy_from_root_name.ql" "lgtm-cpp-query-pack/$copy_to_root_name.ql"
cp "$copy_from_root_name-implementation.qhelp" "lgtm-cpp-query-pack/$copy_to_root_name-implementation.qhelp"
cp "$copy_from_root_name.qhelp" "lgtm-cpp-query-pack/$copy_to_root_name.qhelp"
done
}
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/codeql_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ jobs:
codeql-home: ${{ github.workspace }}/codeql_home
add-to-path: false

- name: Pre-Compile Queries
id: pre-compile-queries
run: |
${{ github.workspace }}/codeql_home/codeql/codeql query compile --search-path cpp --threads 0 cpp
${{ github.workspace }}/codeql_home/codeql/codeql query compile --search-path c --search-path cpp --threads 0 c
- name: Run test suites
id: run-test-suites
env:
Expand Down Expand Up @@ -108,12 +115,20 @@ jobs:
# XL runners have 8 cores, so split the tests into 8 "slices", and run one per thread
num_slices = 8
procs = []
for slice in range(1, num_slices+1):
test_report_path = os.path.join(runner_temp, "${{ matrix.language }}", f"test_report_{runner_os}_{cli_version}_{stdlib_ref_ident}_slice_{slice}_of_{num_slices}.json")
os.makedirs(os.path.dirname(test_report_path), exist_ok=True)
test_report_file = open(test_report_path, 'w')
files_to_close.append(test_report_file)
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}', *test_roots], stdout=test_report_file, stderr=subprocess.PIPE))
if "${{ matrix.language }}".casefold() == "c".casefold():
# c tests require cpp -- but we don't want c things on the cpp
# path in case of design errors.
cpp_language_root = Path(workspace, 'cpp')
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))
else:
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))
for p in procs:
p.wait()
if p.returncode != 0:
Expand All @@ -133,7 +148,7 @@ jobs:
- name: Upload test results
uses: actions/upload-artifact@v2
with:
name: test-results-${{ runner.os }}-${{ matrix.codeql_cli }}-${{ matrix.codeql_standard_library_ident }}
name: ${{ matrix.language }}-test-results-${{ runner.os }}-${{ matrix.codeql_cli }}-${{ matrix.codeql_standard_library_ident }}
path: |
${{ runner.temp }}/${{ matrix.language }}/test_report_${{ runner.os }}_${{ matrix.codeql_cli }}_${{ matrix.codeql_standard_library_ident }}_slice_*.json
if-no-files-found: error
Expand All @@ -148,11 +163,11 @@ jobs:

- name: Validate test results
run: |
for json_report in test-results-*/test_report_*
for json_report in *-test-results-*/test_report_*
do
jq --raw-output '"PASS \(map(select(.pass == true)) | length)/\(length)'" $json_report\"" "$json_report"
done
FAILING_TESTS=$(jq --raw-output '.[] | select(.pass == false)' test-results-*/test_report_*.json)
FAILING_TESTS=$(jq --raw-output '.[] | select(.pass == false)' *-test-results-*/test_report_*.json)
if [[ ! -z "$FAILING_TESTS" ]]; then
echo "ERROR: The following tests failed:"
echo $FAILING_TESTS | jq .
Expand Down
45 changes: 23 additions & 22 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
},
"problemMatcher": []
},

{
"label": "🔃 Standards Automation: Switch To Test or Implementation",
"type": "shell",
Expand All @@ -23,7 +22,6 @@
},
"problemMatcher": []
},

{
"label": "Standards Automation: Install Deps",
"type": "shell",
Expand Down Expand Up @@ -165,49 +163,52 @@
"type": "pickString",
"options": [
"Allocations",
"BannedFunctions",
"BannedSyntax",
"BannedTypes",
"BannedFunctions",
"Classes",
"Classes",
"Classes",
"Comments",
"Concurrency",
"Conditionals",
"Const",
"DeadCode",
"Declarations",
"Exceptions1",
"Exceptions2",
"Expressions",
"Freed",
"Functions",
"IO",
"Includes",
"Initialization",
"IntegerConversion",
"Invariants",
"IO",
"Iterators",
"Lambdas",
"Literals",
"Loops",
"Macros",
"Misc",
"MoveForward",
"Naming",
"Null",
"OperatorInvariants",
"Operators",
"Pointers",
"Scope",
"Classes",
"SmartPointers1",
"SmartPointers2",
"SideEffects1",
"SideEffects2",
"SmartPointers1",
"SmartPointers2",
"Strings",
"Strings1",
"Strings2",
"Syntax",
"Templates",
"Classes",
"Freed",
"Initialization",
"Functions",
"Null",
"OperatorInvariants",
"VirtualFunctions",
"Conditionals",
"MoveForward",
"Operators",
"TypeRanges",
"Lambdas",
"Pointers",
"IntegerConversion",
"Expressions",
"DeadCode"
"VirtualFunctions"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion c/cert/src/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: cert-c-coding-standards
version: 2.1.0
version: 2.3.0
suites: codeql-suites
libraryPathDependencies: common-c-coding-standards

This file was deleted.

Loading

0 comments on commit 73ac82c

Please sign in to comment.