diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 25003648..b20213bb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ concurrency: jobs: rules_test: - name: Analysis + name: Unit tests runs-on: ubuntu-24.04 steps: @@ -36,6 +36,18 @@ jobs: clang \ clang-tools \ clang-tidy + # The default naming of the clang-extdef-mapping, needed for CTU, is + # installed by clang-tools also contains the major version + # (e.g. clang-extdef-mapping-18), but the bazel rules reference it + # without the version number. To this end, we use update-alternatives + # to rename the binary to omit it. + sudo update-alternatives --install \ + /usr/bin/clang-extdef-mapping \ + clang-extdef-mapping \ + /usr/bin/clang-extdef-mapping-$(clang --version | head -n 1 | + sed -E 's/.*version ([0-9]+)\..*/\1/') \ + 100 + - name: Install CodeChecker run: pip3 install codechecker @@ -48,3 +60,8 @@ jobs: "CodeChecker finds different analyzers when running in " \ "bazel's sandbox environment!" CodeChecker analyzers + + - name: Run tests + run: | + cd test + python3 test.py -vvv diff --git a/test/BUILD b/test/BUILD index ccd08940..6ba0500c 100644 --- a/test/BUILD +++ b/test/BUILD @@ -134,7 +134,6 @@ codechecker_test( name = "codechecker_pass", analyze = [ "--ctu", - "--stats", ], config = "codechecker_config_json", targets = [ @@ -260,7 +259,6 @@ code_checker_test( name = "code_checker_pass", options = [ "--ctu", - "--stats", ], targets = [ "test_pass", @@ -284,7 +282,6 @@ code_checker_test( name = "code_checker_ctu", options = [ "--ctu", - "--stats", ], tags = [ "manual",