diff options
| author | Jussi Pakkanen <jussi.pakkanen@mailbox.org> | 2025-06-17 19:27:19 +0300 |
|---|---|---|
| committer | Jussi Pakkanen <jussi.pakkanen@mailbox.org> | 2025-06-18 17:22:04 +0300 |
| commit | 7f908d909ea6874af0512e2258777f5cd42be790 (patch) | |
| tree | 9a00e9f52969370bb59439a6a8b465669f2f2e7e | |
| parent | c3ea9753e3941789bdd4b8458a9912f407a5f9de (diff) | |
| download | meson-7f908d909ea6874af0512e2258777f5cd42be790.tar.gz | |
Remove coverage measurement.
| -rw-r--r-- | .github/codecov.yml | 11 | ||||
| -rw-r--r-- | .github/workflows/cygwin.yml | 18 | ||||
| -rw-r--r-- | .github/workflows/lint.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/macos.yml | 32 | ||||
| -rw-r--r-- | .github/workflows/msys2.yml | 15 | ||||
| -rw-r--r-- | .github/workflows/nonnative.yml | 14 | ||||
| -rw-r--r-- | .github/workflows/os_comp.yml | 26 | ||||
| -rw-r--r-- | .github/workflows/unusedargs_missingreturn.yml | 30 | ||||
| -rw-r--r-- | azure-pipelines.yml | 5 | ||||
| -rwxr-xr-x | ci/combine_cov.sh | 10 | ||||
| -rw-r--r-- | ci/coverage.ps1 | 14 | ||||
| -rw-r--r-- | ci/run.ps1 | 4 | ||||
| -rw-r--r-- | ci/usercustomize.py | 5 | ||||
| -rwxr-xr-x | tools/run_with_cov.py | 42 |
14 files changed, 17 insertions, 211 deletions
diff --git a/.github/codecov.yml b/.github/codecov.yml deleted file mode 100644 index fa7b82a05..000000000 --- a/.github/codecov.yml +++ /dev/null @@ -1,11 +0,0 @@ -coverage: - status: - project: - default: - informational: true - patch: - default: - informational: true -comment: false -github_checks: - annotations: false diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index d641b1850..2ba1ff207 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -87,7 +87,7 @@ jobs: - name: Run pip run: | export PATH=/usr/bin:/usr/local/bin:$(cygpath ${SYSTEMROOT})/system32 - python3 -m pip --disable-pip-version-check install gcovr fastjsonschema pefile pytest pytest-subtests pytest-xdist coverage + python3 -m pip --disable-pip-version-check install gcovr fastjsonschema pefile pytest pytest-subtests pytest-xdist shell: C:\cygwin\bin\bash.exe --noprofile --norc -o igncr -eo pipefail '{0}' - uses: actions/cache/save@v4 @@ -99,7 +99,7 @@ jobs: - name: Run tests run: | export PATH=/usr/bin:/usr/local/bin:$(cygpath ${SYSTEMROOT})/system32 - python3 ./tools/run_with_cov.py run_tests.py --backend=ninja + python3 ./run_tests.py --backend=ninja env: # Cygwin's static boost installation is broken (some static library # variants such as boost_thread are not present) @@ -112,17 +112,3 @@ jobs: path: meson-test-run.* # test log should be saved on failure if: ${{ !cancelled() }} - - - name: Aggregate coverage reports - run: | - export PATH=/usr/bin:/usr/local/bin:$(cygpath ${SYSTEMROOT})/system32 - ./ci/combine_cov.sh - shell: C:\cygwin\bin\bash.exe --noprofile --norc -o igncr -eo pipefail '{0}' - - - name: Upload coverage report - uses: codecov/codecov-action@v3 - with: - files: .coverage/coverage.xml - name: "${{ matrix.NAME }}" - fail_ci_if_error: false - verbose: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 558803472..ef5889579 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -53,7 +53,7 @@ jobs: with: python-version: '3.x' # Pin mypy to version 1.8, so we retain the ability to lint for Python 3.7 - - run: python -m pip install "mypy==1.8" coverage strictyaml types-PyYAML types-tqdm types-chevron + - run: python -m pip install "mypy==1.8" strictyaml types-PyYAML types-tqdm types-chevron - run: python run_mypy.py --allver env: PYTHONUNBUFFERED: 1 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 675807bd8..3afb4baca 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -35,7 +35,7 @@ jobs: - run: | export PATH="$HOME/Library/Python/3.9/bin:$PATH" /usr/bin/python3 -m pip install --upgrade pip - /usr/bin/python3 -m pip install pytest pytest-xdist pytest-subtests fastjsonschema coverage + /usr/bin/python3 -m pip install pytest pytest-xdist pytest-subtests fastjsonschema - run: brew install pkg-config ninja llvm qt@5 - env: CPPFLAGS: "-I/opt/homebrew/include" @@ -48,20 +48,7 @@ jobs: export SDKROOT="$(xcodebuild -version -sdk macosx Path)" export PATH="$HOME/Library/Python/3.9/bin:$HOME/tools:/opt/homebrew/opt/qt@5/bin:/opt/homebrew/opt/llvm/bin:$PATH" export PKG_CONFIG_PATH="/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/Current/lib/pkgconfig:/opt/homebrew/opt/qt@5/lib/pkgconfig:$PKG_CONFIG_PATH" - /usr/bin/python3 ./tools/run_with_cov.py ./run_unittests.py - - - name: Aggregate coverage reports - run: | - export PATH="$HOME/Library/Python/3.9/bin:$PATH" - ./ci/combine_cov.sh - - - name: Upload coverage report - uses: codecov/codecov-action@v3 - with: - files: .coverage/coverage.xml - name: "appleclang [unit tests]" - fail_ci_if_error: false - verbose: true + /usr/bin/python3 ./run_unittests.py project-tests-appleclang: @@ -98,7 +85,7 @@ jobs: # https://github.com/actions/setup-python/issues/58 - run: brew install pkg-config ninja llvm qt@5 boost ldc hdf5 openmpi lapack scalapack sdl2 boost-python3 gtk-doc zstd ncurses objfw libomp - run: | - python3 -m pip install cython coverage + python3 -m pip install cython - env: CPPFLAGS: "-I/opt/homebrew/include" LDFLAGS: "-L/opt/homebrew/lib" @@ -112,18 +99,7 @@ jobs: # We need this to avoid objfw test failures. export PATH="$HOME/tools:/opt/homebrew/opt/qt@5/bin:/opt/homebrew/opt/ncurses/bin:$PATH:/opt/homebrew/opt/llvm/bin" export PKG_CONFIG_PATH="/opt/homebrew/opt/qt@5/lib/pkgconfig:/opt/homebrew/opt/lapack/lib/pkgconfig:/opt/homebrew/opt/ncurses/lib/pkgconfig:$PKG_CONFIG_PATH" - ./tools/run_with_cov.py ./run_project_tests.py --backend=ninja - - - name: Aggregate coverage reports - run: ./ci/combine_cov.sh - - - name: Upload coverage report - uses: codecov/codecov-action@v3 - with: - files: .coverage/coverage.xml - name: "appleclang [project tests; unity=${{ matrix.unity }}]" - fail_ci_if_error: false - verbose: true + ./run_project_tests.py --backend=ninja Qt4macos: # This job only works on Intel Macs, because OpenSSL 1.0 doesn't build on diff --git a/.github/workflows/msys2.yml b/.github/workflows/msys2.yml index d1c2fa2b6..b926d1898 100644 --- a/.github/workflows/msys2.yml +++ b/.github/workflows/msys2.yml @@ -90,7 +90,7 @@ jobs: - name: Install dependencies run: | - python3 -m pip --disable-pip-version-check install gcovr pefile pytest pytest-subtests pytest-xdist coverage + python3 -m pip --disable-pip-version-check install gcovr pefile pytest pytest-subtests pytest-xdist - name: Install pypy3 on x86_64 run: | @@ -125,20 +125,9 @@ jobs: pacman --noconfirm --needed -S mingw-w64-${{ matrix.MSYS2_ARCH }}-${{ matrix.MSYS2_CURSES }} fi - MSYSTEM= python3 ./tools/run_with_cov.py run_tests.py --backend=ninja + MSYSTEM= python3 ./run_tests.py --backend=ninja - uses: actions/upload-artifact@v4 with: name: ${{ matrix.NAME }} path: meson-test-run.* - - - name: Aggregate coverage reports - run: ./ci/combine_cov.sh - - - name: Upload coverage report - uses: codecov/codecov-action@v3 - with: - files: .coverage/coverage.xml - name: "${{ matrix.NAME }}" - fail_ci_if_error: false - verbose: true diff --git a/.github/workflows/nonnative.yml b/.github/workflows/nonnative.yml index 4e9c28310..c616f5199 100644 --- a/.github/workflows/nonnative.yml +++ b/.github/workflows/nonnative.yml @@ -36,21 +36,9 @@ jobs: - run: | apt-get -y purge clang gcc gdc apt-get -y autoremove - python3 -m pip install coverage - uses: actions/checkout@v4 - name: Run tests - run: bash -c 'source /ci/env_vars.sh; cd $GITHUB_WORKSPACE; ./tools/run_with_cov.py ./run_tests.py $CI_ARGS --cross ubuntu-armhf.json --cross-only' - - - name: Aggregate coverage reports - run: ./ci/combine_cov.sh - - - name: Upload coverage report - uses: codecov/codecov-action@v3 - with: - files: .coverage/coverage.xml - name: "Ubuntu nonnative" - fail_ci_if_error: false - verbose: true + run: bash -c 'source /ci/env_vars.sh; cd $GITHUB_WORKSPACE; ./run_tests.py $CI_ARGS --cross ubuntu-armhf.json --cross-only' cross-cuda: runs-on: ubuntu-latest diff --git a/.github/workflows/os_comp.yml b/.github/workflows/os_comp.yml index 0912a750a..4b9b7a4a6 100644 --- a/.github/workflows/os_comp.yml +++ b/.github/workflows/os_comp.yml @@ -72,18 +72,7 @@ jobs: source /ci/env_vars.sh cd $GITHUB_WORKSPACE - ./tools/run_with_cov.py ./run_tests.py $CI_ARGS - - - name: Aggregate coverage reports - run: ./ci/combine_cov.sh - - - name: Upload coverage report - uses: codecov/codecov-action@v3 - with: - files: .coverage/coverage.xml - name: "OS Comp [${{ matrix.cfg.name }}]" - fail_ci_if_error: false - verbose: true + ./run_tests.py $CI_ARGS pypy: name: 'Arch / PyPy' @@ -172,15 +161,4 @@ jobs: update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix - ./tools/run_with_cov.py ./run_tests.py $RUN_TESTS_ARGS -- $MESON_ARGS - - - name: Aggregate coverage reports - run: ./ci/combine_cov.sh - - - name: Upload coverage report - uses: codecov/codecov-action@v3 - with: - files: .coverage/coverage.xml - name: "Ubuntu [${{ matrix.cfg.CC }} ${{ matrix.cfg.RUN_TESTS_ARGS }} ${{ matrix.cfg.MESON_ARGS }}]" - fail_ci_if_error: false - verbose: true + ./run_tests.py $RUN_TESTS_ARGS -- $MESON_ARGS diff --git a/.github/workflows/unusedargs_missingreturn.yml b/.github/workflows/unusedargs_missingreturn.yml index d6f1246d1..4367ce556 100644 --- a/.github/workflows/unusedargs_missingreturn.yml +++ b/.github/workflows/unusedargs_missingreturn.yml @@ -52,22 +52,10 @@ jobs: run: | sudo apt update -yq sudo apt install -yq --no-install-recommends g++ gfortran ninja-build gobjc gobjc++ - python -m pip install coverage - - run: ./tools/run_with_cov.py run_project_tests.py --only cmake common fortran platform-linux "objective c" "objective c++" + - run: ./run_project_tests.py --only cmake common fortran platform-linux "objective c" "objective c++" env: MESON_CI_JOBNAME: linux-ubuntu-gcc-werror - - name: Aggregate coverage reports - run: ./ci/combine_cov.sh - - - name: Upload coverage report - uses: codecov/codecov-action@v3 - with: - files: .coverage/coverage.xml - name: "UnusedMissingReturn" - fail_ci_if_error: false - verbose: true - windows: runs-on: windows-latest steps: @@ -76,23 +64,11 @@ jobs: with: python-version: '3.x' - - run: pip install ninja pefile coverage + - run: pip install ninja pefile - - run: python ./tools/run_with_cov.py run_project_tests.py --only platform-windows + - run: python ./run_project_tests.py --only platform-windows env: CC: gcc CXX: g++ FC: gfortran MESON_CI_JOBNAME: msys2-gcc-werror - - - name: Aggregate coverage reports - run: ./ci/combine_cov.sh - shell: C:\msys64\usr\bin\bash.exe --noprofile --norc -o igncr -eo pipefail '{0}' - - - name: Upload coverage report - uses: codecov/codecov-action@v3 - with: - files: .coverage/coverage.xml - name: "UnusedMissingReturn Windows" - fail_ci_if_error: false - verbose: true diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ea511f33f..86c6b3aa2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -114,8 +114,3 @@ jobs: filePath: .\ci\run.ps1 env: MESON_CI_JOBNAME: azure-$(System.JobName) - - task: PowerShell@2 - displayName: Gathering coverage report - inputs: - targetType: 'filePath' - filePath: .\ci\coverage.ps1 diff --git a/ci/combine_cov.sh b/ci/combine_cov.sh deleted file mode 100755 index 99a503bb8..000000000 --- a/ci/combine_cov.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -echo "Combining coverage reports..." -coverage combine - -echo "Generating XML report..." -coverage xml - -echo "Printing report" -coverage report diff --git a/ci/coverage.ps1 b/ci/coverage.ps1 deleted file mode 100644 index ebd7cd4c3..000000000 --- a/ci/coverage.ps1 +++ /dev/null @@ -1,14 +0,0 @@ -echo "" -echo "" -echo "=== Gathering coverage report ===" -echo "" - -python3 -m coverage combine -python3 -m coverage xml -python3 -m coverage report - -# Currently codecov.py does not handle Azure, use this fork of a fork to get it -# working without requiring a token -git clone https://github.com/mensinda/codecov-python -python3 -m pip install --ignore-installed ./codecov-python -python3 -m codecov -f .coverage/coverage.xml -n "VS$env:compiler $env:arch $env:backend" -c $env:SOURCE_VERSION diff --git a/ci/run.ps1 b/ci/run.ps1 index d781cf725..5b754bd36 100644 --- a/ci/run.ps1 +++ b/ci/run.ps1 @@ -92,7 +92,7 @@ python --version # Needed for running unit tests in parallel. echo "" -python -m pip --disable-pip-version-check install --upgrade pefile pytest-xdist pytest-subtests fastjsonschema coverage +python -m pip --disable-pip-version-check install --upgrade pefile pytest-xdist pytest-subtests fastjsonschema # Needed for running the Cython tests python -m pip --disable-pip-version-check install cython @@ -102,6 +102,6 @@ echo "=== Start running tests ===" # Starting from VS2019 Powershell(?) will fail the test run # if it prints anything to stderr. Python's test runner # does that by default so we need to forward it. -cmd /c "python 2>&1 ./tools/run_with_cov.py run_tests.py --backend $env:backend $env:extraargs" +cmd /c "python 2>&1 run_tests.py --backend $env:backend $env:extraargs" exit $LastExitCode diff --git a/ci/usercustomize.py b/ci/usercustomize.py deleted file mode 100644 index d72c6ad2d..000000000 --- a/ci/usercustomize.py +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2021 The Meson development team - -import coverage -coverage.process_startup() diff --git a/tools/run_with_cov.py b/tools/run_with_cov.py deleted file mode 100755 index 0d3fba654..000000000 --- a/tools/run_with_cov.py +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env python3 -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2021 The Meson development team - -import subprocess -import coverage -import os -import sys -from pathlib import Path - -root_path = Path(__file__).parent.parent.absolute() - -# Python magic so we can import mesonlib -sys.path.append(root_path.as_posix()) -from mesonbuild import mesonlib - -def generate_coveragerc() -> Path: - i_file = (root_path / 'data' / '.coveragerc.in') - o_file = (root_path / '.coveragerc') - raw = i_file.read_text(encoding='utf-8') - raw = raw.replace('@ROOT@', root_path.as_posix()) - o_file.write_text(raw, encoding='utf-8') - return o_file - -def main() -> int: - # Remove old run data - out_dir = root_path / '.coverage' - mesonlib.windows_proof_rmtree(out_dir.as_posix()) - out_dir.mkdir(parents=True, exist_ok=True) - - # Setup coverage - python_path = (root_path / 'ci').as_posix() - os.environ['PYTHONPATH'] = os.pathsep.join([python_path, os.environ.get('PYTHONPATH', '')]) - os.environ['COVERAGE_PROCESS_START'] = generate_coveragerc().as_posix() - coverage.process_startup() - - # Run the actual command - cmd = mesonlib.python_command + sys.argv[1:] - return subprocess.run(cmd, env=os.environ.copy()).returncode - -if __name__ == '__main__': - raise SystemExit(main()) |
