diff --git a/.codecov.yml b/.codecov.yml index 2b56c5c224..3c4f6a9d82 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -4,6 +4,7 @@ # See https://docs.codecov.io/docs/codecovyml-reference codecov: + token: a75b1e95-134c-4ada-adac-5846045f188 require_ci_to_pass: no # codecov reports its results independent of whether CI passed notify: wait_for_ci: no # codecov has not to wait until the CI is finished to post its results @@ -19,3 +20,7 @@ coverage: if_ci_failed: success # per default, codecov would fail if any CI fails informational: true # the codecov/patch status is never "fail" only_pulls: true # only post codecov/patch status on PRs + +parsers: + cobertura: + partials_as_hits: true diff --git a/.github/workflows/ci_cmake.yml b/.github/workflows/ci_cmake.yml index eb8bd28978..4818351dbb 100644 --- a/.github/workflows/ci_cmake.yml +++ b/.github/workflows/ci_cmake.yml @@ -28,74 +28,55 @@ defaults: jobs: build: name: ${{ matrix.name }} - runs-on: ubuntu-22.04 - timeout-minutes: 120 + runs-on: ubuntu-latest if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint' strategy: fail-fast: false matrix: include: - name: "Non-cyclic tests" - compiler: "gcc-13" + compiler: "gcc-14" build: unit - build_type: Debug use_include_dependencies: "ON" + cmake_depends_use_compiler: "OFF" - name: "External project" - compiler: "gcc-13" + compiler: "gcc-14" build: external_project - build_type: Debug - + use_include_dependencies: "OFF" + cmake_depends_use_compiler: "ON" + container: + image: ghcr.io/seqan/${{ matrix.compiler }} + volumes: + - /home/runner:/home/runner steps: - - name: Checkout SeqAn3 + - name: Checkout uses: actions/checkout@v4 with: - path: seqan3 - fetch-depth: 1 submodules: true - name: Checkout SeqAn2 uses: actions/checkout@v4 with: repository: seqan/seqan - path: seqan3/submodules/seqan - fetch-depth: 1 - - - name: Install CMake - uses: seqan/actions/setup-cmake@main - with: - cmake: 3.16.9 - - - name: Install CMake dependency - if: matrix.build == 'external_project' - run: | - mkdir -p /tmp/libidn11-download - wget --retry-connrefused --waitretry=30 --read-timeout=30 --timeout=30 --tries=20 --no-clobber --quiet --directory-prefix=/tmp/libidn11-download/ http://ftp.de.debian.org/debian/pool/main/libi/libidn/libidn11_1.33-3_amd64.deb - sudo dpkg -i /tmp/libidn11-download/libidn11_1.33-3_amd64.deb - - - name: Setup compiler - uses: seqan/actions/setup-compiler@main - with: - compiler: ${{ matrix.compiler }} + path: submodules/seqan - name: Configure tests run: | - mkdir seqan3-build - cd seqan3-build - cmake ../seqan3/test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" \ - -DSEQAN3_VERBOSE_TESTS=OFF \ - -DSEQAN3_USE_INCLUDE_DEPENDENCIES="${{ matrix.use_include_dependencies }}" + mkdir build && cd build + cmake ../test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_DEPENDS_USE_COMPILER="${{ matrix.cmake_depends_use_compiler }}" \ + -DSEQAN3_USE_INCLUDE_DEPENDENCIES="${{ matrix.use_include_dependencies }}" case "${{ matrix.build }}" in - unit) make -j${{ matrix.build_threads }} gtest_build;; - external_project) make -j${{ matrix.build_threads }} seqan3_test_prerequisite sharg_test_prerequisite;; + unit) make gtest_build;; + external_project) make seqan3_test_prerequisite sharg_test_prerequisite;; esac - name: Build tests + working-directory: build run: | - cd seqan3-build case "${{ matrix.build }}" in - unit) make -k -j2 all_dependencies; cmake .;; - external_project) make -k -j1;; + unit) make -k all_dependencies; cmake .;; + external_project) make -k;; esac diff --git a/.github/workflows/ci_coverage.yml b/.github/workflows/ci_coverage.yml index 2b8860bfda..764ce0abea 100644 --- a/.github/workflows/ci_coverage.yml +++ b/.github/workflows/ci_coverage.yml @@ -27,78 +27,79 @@ defaults: jobs: build: - name: ${{ matrix.name }} - runs-on: ubuntu-22.04 - timeout-minutes: 120 + runs-on: ubuntu-latest + name: ${{ matrix.compiler }} if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint' strategy: - fail-fast: true + fail-fast: false matrix: - include: - - name: "gcc13" - compiler: "gcc-13" - build: coverage - build_type: Debug - + compiler: ["gcc-14"] + container: + image: ghcr.io/seqan/${{ matrix.compiler }} + volumes: + - /home/runner:/home/runner steps: - # How many commits do we need to fetch to also fetch the branch point? - - name: Get fetch depth - id: fetch_depth - run: echo "depth=$(( ${{ github.event.pull_request.commits }} + 2 ))" >> $GITHUB_OUTPUT - - - name: Checkout SeqAn3 + - name: Checkout uses: actions/checkout@v4 with: - path: seqan3 - fetch-depth: ${{ steps.fetch_depth.outputs.depth }} submodules: true + fetch-depth: 0 - name: Checkout SeqAn2 uses: actions/checkout@v4 with: repository: seqan/seqan - path: seqan3/submodules/seqan - fetch-depth: 1 - - - name: Setup toolchain - uses: seqan/actions/setup-toolchain@main - with: - compiler: ${{ matrix.compiler }} - ccache_size: 525M + path: submodules/seqan - - name: Install CMake - uses: seqan/actions/setup-cmake@main + - name: Load ccache + uses: actions/cache@v4 with: - cmake: 3.16.9 + path: /home/runner/.ccache + save-always: true + key: ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }}-${{ github.ref }}-${{ github.run_id }} + restore-keys: | + ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }}-${{ github.ref }} + ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }} - - name: Install gcovr - run: | - sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/${CC/gcc/gcov} 100 - pip install gcovr==6.0 + - name: Increase ccache size + run: echo "CCACHE_MAXSIZE=300M" >> "${GITHUB_ENV}" - name: Configure tests run: | - mkdir seqan3-build - cd seqan3-build - cmake ../seqan3/test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" \ - -DSEQAN3_VERBOSE_TESTS=OFF \ - -DSEQAN3_BENCHMARK_MIN_TIME=0.01 \ - -DSEQAN3_COVERAGE_PARALLEL_LEVEL=2 - make -j2 gtest_build + mkdir build && cd build + cmake ../test/coverage -DCMAKE_BUILD_TYPE=Coverage + make gtest_build - name: Build tests - env: - GCOV: ${{ github.workspace }}/seqan3/.github/workflows/scripts/gcov.sh + working-directory: build run: | ccache -z - cd seqan3-build - make -k -j2 - ccache -sv + make -k + ccache -svvx + + - name: Run tests + working-directory: build + run: ctest . -j --output-on-failure + + - name: Generate coverage report + run: | + gcovr --root ${GITHUB_WORKSPACE}/test/coverage \ + ${GITHUB_WORKSPACE}/build \ + --filter ${GITHUB_WORKSPACE}/include/seqan3 \ + --filter ${GITHUB_WORKSPACE}/test/include/seqan3/test \ + --exclude ${GITHUB_WORKSPACE}/include/seqan3/contrib \ + --exclude ${GITHUB_WORKSPACE}/include/seqan3/std \ + --exclude-lines-by-pattern '^\s*$' \ + --exclude-lines-by-pattern '^\s*};$' \ + --exclude-unreachable-branches \ + --exclude-throw-branches \ + --exclude-noncode-lines \ + -j \ + --cobertura \ + --output ${GITHUB_WORKSPACE}/build/coverage_report.xml - name: Submit coverage build - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v3.1.5 with: - token: ${{ secrets.CODECOV_TOKEN }} - files: ${{ github.workspace }}/seqan3-build/seqan3_coverage.xml - root_dir: ${{ github.workspace }}/seqan3 + files: build/coverage_report.xml + fail_ci_if_error: false diff --git a/.github/workflows/ci_documentation.yml b/.github/workflows/ci_documentation.yml index 8679f5c2bf..08fbeb3b3f 100644 --- a/.github/workflows/ci_documentation.yml +++ b/.github/workflows/ci_documentation.yml @@ -23,33 +23,16 @@ env: defaults: run: - shell: bash -Eexuo pipefail {0} + shell: bash -Eeuxo pipefail {0} jobs: build: name: Documentation - runs-on: ubuntu-22.04 - timeout-minutes: 120 + runs-on: ubuntu-latest if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint' steps: - - name: Checkout SeqAn3 + - name: Checkout uses: actions/checkout@v4 - with: - path: seqan3 - fetch-depth: 1 - submodules: true - - - name: Checkout SeqAn2 - uses: actions/checkout@v4 - with: - repository: seqan/seqan - path: seqan3/submodules/seqan - fetch-depth: 1 - - - name: Install CMake - uses: seqan/actions/setup-cmake@main - with: - cmake: 3.16.9 - name: Install Doxygen uses: seqan/actions/setup-doxygen@main @@ -58,12 +41,10 @@ jobs: - name: Configure tests run: | - mkdir seqan3-build - cd seqan3-build - cmake ../seqan3/test/documentation - make -j2 download-cppreference-doxygen-web-tag + mkdir build && cd build + cmake ../test/documentation + make download-cppreference-doxygen-web-tag - name: Run tests - run: | - cd seqan3-build - ctest . -j2 --output-on-failure + working-directory: build + run: ctest . -j --output-on-failure diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index 2cb6dab7cc..8ab7da4ee7 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -27,92 +27,58 @@ defaults: jobs: build: - name: ${{ matrix.name }} - runs-on: ubuntu-22.04 - timeout-minutes: 120 + runs-on: ubuntu-latest + name: ${{ matrix.compiler }} if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint' strategy: - fail-fast: true + fail-fast: false matrix: + compiler: ["clang-18", "clang-17", "gcc-14", "gcc-13", "gcc-12", "gcc-11", "intel"] include: - - name: "clang17 libc++" - compiler: "clang-17" - build: unit - build_type: Release - cxx_flags: "-stdlib=libc++" - - - name: "clang17" - compiler: "clang-17" - build: unit - build_type: Release - - - name: "gcc13" - compiler: "gcc-13" - build: unit - build_type: Release - cxx_flags: "-std=c++23" - - - name: "gcc12" - compiler: "gcc-12" - build: unit - build_type: Release - - - name: "gcc11" - compiler: "gcc-11" - build: unit - build_type: Release - - - name: "IntelLLVM" - compiler: "intel" - build: unit - build_type: Release - cxx_flags: "-fp-model=strict" - + - compiler: "intel" + cxx_flags: "-fp-model=strict -Wno-overriding-option" + container: + image: ghcr.io/seqan/${{ matrix.compiler }} + volumes: + - /home/runner:/home/runner steps: - - name: Checkout SeqAn3 + - name: Checkout uses: actions/checkout@v4 with: - path: seqan3 - fetch-depth: 1 submodules: true - name: Checkout SeqAn2 uses: actions/checkout@v4 with: repository: seqan/seqan - path: seqan3/submodules/seqan - fetch-depth: 1 - - - name: Setup toolchain - uses: seqan/actions/setup-toolchain@main - with: - compiler: ${{ matrix.compiler }} - ccache_size: 75M + path: submodules/seqan - - name: Install CMake - if: contains(matrix.compiler, 'intel') == false - uses: seqan/actions/setup-cmake@main + - name: Load ccache + uses: actions/cache@v4 with: - cmake: 3.16.9 + path: /home/runner/.ccache + save-always: true + key: ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }}-${{ github.ref }}-${{ github.run_id }} + restore-keys: | + ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }}-${{ github.ref }} + ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }} - name: Configure tests run: | - mkdir seqan3-build - cd seqan3-build - cmake ../seqan3/test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" \ - -DSEQAN3_VERBOSE_TESTS=OFF - make -j2 gtest_build + $CXX --version || true + mkdir build && cd build + cmake ../test/unit -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" + make gtest_build - name: Build tests + working-directory: build run: | ccache -z - cd seqan3-build - make -k -j2 - ccache -sv + make -k + ccache -svvx - name: Run tests - run: | - cd seqan3-build - ctest . -j2 --output-on-failure + working-directory: build + run: ctest . -j --output-on-failure diff --git a/.github/workflows/ci_macos.yml b/.github/workflows/ci_macos.yml index e5060b286f..d0aca103d2 100644 --- a/.github/workflows/ci_macos.yml +++ b/.github/workflows/ci_macos.yml @@ -23,54 +23,28 @@ env: defaults: run: - shell: bash -Eexuo pipefail {0} + shell: bash -Eeuxo pipefail {0} jobs: build: - name: ${{ matrix.name }} + name: ${{ matrix.compiler }} runs-on: macos-12 - timeout-minutes: 120 if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint' strategy: - fail-fast: true + fail-fast: false matrix: - include: - - name: "clang17" - compiler: "clang-17" - build: unit - build_type: Release - cxx_flags: "-stdlib=libc++" # For verbosity. This is already the default. - - - name: "gcc13" - compiler: "gcc-13" - build: unit - build_type: Release - cxx_flags: "-std=c++23" - - - name: "gcc12" - compiler: "gcc-12" - build: unit - build_type: Release - - - name: "gcc11" - compiler: "gcc-11" - build: unit - build_type: Release - + compiler: ["clang-18", "clang-17", "gcc-14", "gcc-13", "gcc-12", "gcc-11"] steps: - - name: Checkout SeqAn3 + - name: Checkout uses: actions/checkout@v4 with: - path: seqan3 - fetch-depth: 1 submodules: true - name: Checkout SeqAn2 uses: actions/checkout@v4 with: repository: seqan/seqan - path: seqan3/submodules/seqan - fetch-depth: 1 + path: submodules/seqan - name: Setup toolchain uses: seqan/actions/setup-toolchain@main @@ -78,28 +52,19 @@ jobs: compiler: ${{ matrix.compiler }} ccache_size: 75M - - name: Install CMake - uses: seqan/actions/setup-cmake@main - with: - cmake: 3.16.9 - - name: Configure tests run: | - mkdir seqan3-build - cd seqan3-build - cmake ../seqan3/test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" \ - -DSEQAN3_VERBOSE_TESTS=OFF - make -j3 gtest_build + mkdir build && cd build + cmake ../test/unit -DCMAKE_BUILD_TYPE=Release + make gtest_build - name: Build tests + working-directory: build run: | ccache -z - cd seqan3-build - make -k -j3 - ccache -sv + make -k + ccache -svvx - name: Run tests - run: | - cd seqan3-build - ctest . -j3 --output-on-failure + working-directory: build + run: ctest . -j --output-on-failure diff --git a/.github/workflows/ci_misc.yml b/.github/workflows/ci_misc.yml index 44e15171da..a0cc987c76 100644 --- a/.github/workflows/ci_misc.yml +++ b/.github/workflows/ci_misc.yml @@ -23,126 +23,66 @@ env: defaults: run: - shell: bash -Eexuo pipefail {0} + shell: bash -Eeuxo pipefail {0} jobs: build: - name: ${{ matrix.name }} - runs-on: ubuntu-22.04 - timeout-minutes: 120 + name: ${{ matrix.build }} ${{ matrix.compiler }} + runs-on: ubuntu-latest if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint' strategy: fail-fast: false matrix: + compiler: ["clang-18", "gcc-14", "gcc-11", "intel"] + build: ["snippet", "performance", "header"] include: - - name: "Snippet clang17 libc++" - compiler: "clang-17" - build: snippet - build_type: Release - test_threads: 1 # snippets create and delete files and some separate tests create/delete the same files - cxx_flags: "-stdlib=libc++" - - - name: "Snippet gcc11" - compiler: "gcc-11" - build: snippet - build_type: Release - test_threads: 1 # snippets create and delete files and some separate tests create/delete the same files - - - name: "Snippet IntelLLVM" - compiler: "intel" - build: snippet - build_type: Release - test_threads: 1 # snippets create and delete files and some separate tests create/delete the same files - cxx_flags: "-fp-model=strict" - - - name: "Performance clang17 libc++" - compiler: "clang-17" - build: performance - build_type: Release - test_threads: 2 - cxx_flags: "-stdlib=libc++" - - - name: "Performance gcc11" - compiler: "gcc-11" - build: performance - build_type: Release - test_threads: 2 - - - name: "Performance IntelLLVM" - compiler: "intel" - build: performance - build_type: Release - test_threads: 2 - cxx_flags: "-fp-model=strict" - - - name: "Header clang17 libc++" - compiler: "clang-17" - build: header - build_type: Release - test_threads: 2 - cxx_flags: "-stdlib=libc++" - - - name: "Header gcc13" - compiler: "gcc-13" - build: header - build_type: Release - test_threads: 2 - - - name: "Header gcc11" - compiler: "gcc-11" - build: header - build_type: Release - test_threads: 2 - + - compiler: "intel" + cxx_flags: "-fp-model=strict -Wno-overriding-option" + container: + image: ghcr.io/seqan/${{ matrix.compiler }} + volumes: + - /home/runner:/home/runner steps: - - name: Checkout SeqAn3 + - name: Checkout uses: actions/checkout@v4 with: - path: seqan3 - fetch-depth: 1 submodules: true - name: Checkout SeqAn2 uses: actions/checkout@v4 with: repository: seqan/seqan - path: seqan3/submodules/seqan - fetch-depth: 1 + path: submodules/seqan - - name: Install CMake - if: contains(matrix.compiler, 'intel') == false - uses: seqan/actions/setup-cmake@main + - name: Load ccache + uses: actions/cache@v4 with: - cmake: 3.16.9 - - - name: Setup toolchain - uses: seqan/actions/setup-toolchain@main - with: - compiler: ${{ matrix.compiler }} - ccache_size: 75M + path: /home/runner/.ccache + save-always: true + key: ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.build }}-${{ matrix.compiler }}-${{ github.ref }}-${{ github.run_id }} + restore-keys: | + ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.build }}-${{ matrix.compiler }}-${{ github.ref }} + ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.build }}-${{ matrix.compiler }} - name: Configure tests run: | - mkdir seqan3-build - cd seqan3-build - cmake ../seqan3/test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" \ - -DSEQAN3_VERBOSE_TESTS=OFF \ - -DSEQAN3_BENCHMARK_MIN_TIME=0.01 + mkdir build && cd build + cmake ../test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" \ + -DSEQAN3_BENCHMARK_MIN_TIME=0.01 case "${{ matrix.build }}" in - snippet) make -j2 gtest_build;; - performance) make -j2 gbenchmark_build;; - header) make -j2 gtest_build gbenchmark_build;; + snippet) make gtest_build;; + performance) make gbenchmark_build;; + header) make gtest_build gbenchmark_build;; esac - name: Build tests + working-directory: build run: | ccache -z - cd seqan3-build - make -k -j2 - ccache -sv + make -k + ccache -svvx - name: Run tests - run: | - cd seqan3-build - ctest . -j${{ matrix.test_threads }} --output-on-failure + working-directory: build + run: ctest . -j${{ matrix.build == 'snippet' && '1' || '' }} --output-on-failure diff --git a/.github/workflows/cron_avx2.yml b/.github/workflows/cron_avx2.yml index 157866ceaa..14d76cdf4b 100644 --- a/.github/workflows/cron_avx2.yml +++ b/.github/workflows/cron_avx2.yml @@ -64,7 +64,6 @@ jobs: mkdir seqan3-build cd seqan3-build cmake ../seqan3/test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=Release \ - -DSEQAN3_VERBOSE_TESTS=OFF \ -DSEQAN3_BENCHMARK_MIN_TIME=0.01 \ -DCMAKE_CXX_FLAGS="-mavx2" case "${{ matrix.build }}" in diff --git a/.github/workflows/cron_latest_libraries.yml b/.github/workflows/cron_latest_libraries.yml index 75825ac32c..7539a6c548 100644 --- a/.github/workflows/cron_latest_libraries.yml +++ b/.github/workflows/cron_latest_libraries.yml @@ -88,7 +88,6 @@ jobs: cd seqan3-build cmake ../seqan3/test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" \ - -DSEQAN3_VERBOSE_TESTS=OFF \ -DSEQAN3_BENCHMARK_MIN_TIME=0.01 case "${{ matrix.build }}" in unit) make -j2 gtest_build;; diff --git a/.github/workflows/ram_usage.yml b/.github/workflows/ram_usage.yml index 7960260c0a..df30178822 100644 --- a/.github/workflows/ram_usage.yml +++ b/.github/workflows/ram_usage.yml @@ -70,8 +70,7 @@ jobs: mkdir seqan3-build cd seqan3-build cmake ../seqan3/test/unit -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_FLAGS="${{ github.event.inputs.cxx_flags }}" \ - -DSEQAN3_VERBOSE_TESTS=OFF + -DCMAKE_CXX_FLAGS="${{ github.event.inputs.cxx_flags }}" - name: Update gcc wrapper run: sed -i "s/DO_TIME=0/DO_TIME=1/" g++.sh diff --git a/.github/workflows/scripts/README.md b/.github/workflows/scripts/README.md index 94c116e620..ee7337d6cf 100644 --- a/.github/workflows/scripts/README.md +++ b/.github/workflows/scripts/README.md @@ -11,12 +11,6 @@ nothing additionial. This mode might be necessary for CMake to properly detect Z When `DO_TIME` is `1`, every call will generate a `ram_usage.*` file with an unique extension containing the output of `time -v`. -## gcov.sh - -We use `gcovr` to create our coverage reports. We do not want to report branch coverage, but only line coverage. -However, when `gcovr` calls `gcov`, the arguments enabling branch coverage reporting are always added. -`gcov.sh` will remove those arguments and pass the remaining arguments to `gcov`. - ## process_compiler_error_log.py Processes the output of compiling tests (`make`) and extracts errors. diff --git a/.github/workflows/scripts/gcov.sh b/.github/workflows/scripts/gcov.sh deleted file mode 100755 index f28434d435..0000000000 --- a/.github/workflows/scripts/gcov.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -# SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin -# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik -# SPDX-License-Identifier: CC0-1.0 - - -args=${@/--branch-counts/""} -args=${args/--branch-probabilities/""} - -exec gcov $args diff --git a/.travis.yml b/.travis.yml index f002af322d..5396174b64 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,7 +59,6 @@ before_script: - | cmake ../seqan3/test/${BUILD} -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS="-Wno-psabi" \ - -DSEQAN3_VERBOSE_TESTS=OFF \ -DSEQAN3_BENCHMARK_MIN_TIME=0.01 - | case "${BUILD}" in diff --git a/include/seqan3/alphabet/container/concatenated_sequences.hpp b/include/seqan3/alphabet/container/concatenated_sequences.hpp index 040ccefd96..d3e616594a 100644 --- a/include/seqan3/alphabet/container/concatenated_sequences.hpp +++ b/include/seqan3/alphabet/container/concatenated_sequences.hpp @@ -977,9 +977,17 @@ class concatenated_sequences auto placeholder = views::repeat_n(std::ranges::range_value_t{}, count * value_len) | std::views::common; // insert placeholder so the tail is moved once: +#if SEQAN3_WORKAROUND_GCC_BOGUS_MEMCPY +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wstringop-overread" +# pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif // SEQAN3_WORKAROUND_GCC_BOGUS_MEMCPY data_values.insert(data_values.begin() + data_delimiters[pos_as_num], std::ranges::begin(placeholder), std::ranges::end(placeholder)); +#if SEQAN3_WORKAROUND_GCC_BOGUS_MEMCPY +# pragma GCC diagnostic pop +#endif // SEQAN3_WORKAROUND_GCC_BOGUS_MEMCPY // assign the actual values to the placeholder: size_t i = data_delimiters[pos_as_num]; diff --git a/include/seqan3/core/platform.hpp b/include/seqan3/core/platform.hpp index aec8b8aad8..bd5577fd1a 100644 --- a/include/seqan3/core/platform.hpp +++ b/include/seqan3/core/platform.hpp @@ -77,7 +77,7 @@ # endif // SEQAN3_DOXYGEN_ONLY(1)0 # ifndef SEQAN3_DISABLE_NEWER_COMPILER_DIAGNOSTIC -# if (__GNUC__ > 13) +# if (__GNUC__ > 14) # pragma message \ "Your compiler is newer than the latest supported compiler of this SeqAn version (gcc-13). It might be that SeqAn does not compile due to this. You can disable this warning by setting -DSEQAN3_DISABLE_NEWER_COMPILER_DIAGNOSTIC." # endif // (__GNUC__ > 13) @@ -227,11 +227,11 @@ static_assert(sdsl::sdsl_version_major == 3, "Only version 3 of the SDSL is supp # endif #endif -/*!\brief Workaround bogus memcpy errors in GCC 12 and 13. (Wrestrict and Wstringop-overflow) +/*!\brief Workaround bogus memcpy errors in GCC > 12. (Wrestrict and Wstringop-overflow) * \see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105545 */ #ifndef SEQAN3_WORKAROUND_GCC_BOGUS_MEMCPY -# if SEQAN3_COMPILER_IS_GCC && (__GNUC__ == 12 || __GNUC__ == 13) +# if SEQAN3_COMPILER_IS_GCC && (__GNUC__ == 12 || __GNUC__ == 13 || __GNUC__ == 14) # define SEQAN3_WORKAROUND_GCC_BOGUS_MEMCPY 1 # else # define SEQAN3_WORKAROUND_GCC_BOGUS_MEMCPY 0 diff --git a/include/seqan3/core/range/detail/inherited_iterator_base.hpp b/include/seqan3/core/range/detail/inherited_iterator_base.hpp index e5078fc943..3500eaf1b3 100644 --- a/include/seqan3/core/range/detail/inherited_iterator_base.hpp +++ b/include/seqan3/core/range/detail/inherited_iterator_base.hpp @@ -206,16 +206,18 @@ class inherited_iterator_base : //!\cond template //!\endcond - constexpr derived_t - operator++(int) noexcept(noexcept(std::declval()++) && noexcept(derived_t(std::declval()))) + constexpr derived_t operator++(int) noexcept(noexcept(std::declval()++) + && std::is_nothrow_copy_constructible_v) requires requires (base_t_ i) { i++; { i++ } -> std::same_as; - } && std::constructible_from + } && std::copy_constructible { - return derived_t{as_base()++}; + derived_t tmp = *this_derived(); + ++as_base(); + return tmp; } //!\brief Pre-decrement, return updated iterator. @@ -233,11 +235,13 @@ class inherited_iterator_base : //!\cond template //!\endcond - constexpr derived_t - operator--(int) noexcept(noexcept(std::declval()--) && noexcept(derived_t{std::declval()})) - requires requires (base_t_ i) { i--; } && std::constructible_from + constexpr derived_t operator--(int) noexcept(noexcept(std::declval()--) + && std::is_nothrow_copy_constructible_v) + requires requires (base_t_ i) { i--; } && std::copy_constructible { - return derived_t{as_base()--}; + derived_t tmp = *this_derived(); + --as_base(); + return tmp; } //!\brief Move iterator to the right. @@ -256,11 +260,12 @@ class inherited_iterator_base : template //!\endcond constexpr derived_t operator+(difference_type const skip) const - noexcept(noexcept(std::declval() + skip) && noexcept(derived_t{std::declval()})) - requires requires (base_t_ const i, difference_type const n) { i + n; } - && std::constructible_from + noexcept(noexcept(std::declval() + skip) && std::is_nothrow_copy_constructible_v) + requires requires (base_t_ const i, difference_type const n) { i + n; } && std::copy_constructible { - return derived_t{as_base() + skip}; + derived_t tmp = *this_derived(); + tmp.as_base() += skip; + return tmp; } //!\brief Non-member operator+ delegates to non-friend operator+. @@ -294,10 +299,12 @@ class inherited_iterator_base : template //!\endcond constexpr derived_t operator-(difference_type const skip) const - noexcept(noexcept(std::declval() - skip) && noexcept(derived_t(std::declval()))) - requires requires (base_t_ i, difference_type const n) { i - n; } && std::constructible_from + noexcept(noexcept(std::declval() - skip) && std::is_nothrow_copy_constructible_v) + requires requires (base_t_ i, difference_type const n) { i - n; } && std::copy_constructible { - return derived_t{as_base() - skip}; + derived_t tmp = *this_derived(); + tmp.as_base() -= skip; + return tmp; } //!\brief Return offset between this and remote iterator's position. diff --git a/test/coverage/CMakeLists.txt b/test/coverage/CMakeLists.txt index eed8508cdf..10046684d1 100644 --- a/test/coverage/CMakeLists.txt +++ b/test/coverage/CMakeLists.txt @@ -5,135 +5,32 @@ cmake_minimum_required (VERSION 3.10...3.22) project (seqan3_test_coverage CXX) -include (../seqan3-test.cmake) - -if (CMAKE_BUILD_TYPE AND NOT ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")) - message (WARNING "Coverage test must be build in debug mode [build type = ${CMAKE_BUILD_TYPE}]") -endif () - -find_program (GCOVR_COMMAND NAMES gcovr) - -if (NOT GCOVR_COMMAND) - message (FATAL_ERROR "gcovr not found! Aborting...") -endif () - -# Holds all target's defined by seqan3_test -set_property (GLOBAL PROPERTY GLOBAL_TEST_COVERAGE_ALL_TESTS "") - -set (SEQAN3_COVERAGE_PARALLEL_LEVEL - "1" - CACHE STRING "Number of threads to use for coverage report generation.") - -set (SEQAN3_GCOVR_ARGUMENTS "") - -macro (seqan3_append_gcovr_args) - set (key ${ARGV0}) - if (${ARGC} EQUAL 1) - list (APPEND SEQAN3_GCOVR_ARGUMENTS ${key}) - else () - string (REPLACE "'^" "\\''^" value "${ARGV1}") - string (REPLACE "$'" "$$'\\'" value "${value}") - string (REPLACE ";" "\\\\\\;" value "${value}") - list (APPEND SEQAN3_GCOVR_ARGUMENTS ${key} ${value}) - endif () -endmacro () - -# Arguments for gcovr. -# Certain chracters will be escaped by seqan3_append_gcovr_args. -# Special CMake characters such as "\" must be escaped manually with "\\". -# We can prevent one level of CMake's string evaluation by using bracket arguments, which are similar to raw strings: -# (https://cmake.org/cmake/help/latest/manual/cmake-language.7.html#bracket-argument) -# gcovr uses python regex expressions. -# See https://gcovr.com/en/5.0/guide.html#the-gcovr-command for an overview of parameters. -# See https://gcovr.com/en/5.0/faq.html#why-does-c-code-have-so-many-uncovered-branches for an explanation on branches. - -# The directory of the CMakeLists.txt used for invoking cmake. -seqan3_append_gcovr_args ("--root" "${CMAKE_CURRENT_LIST_DIR}") -# The build directory. -seqan3_append_gcovr_args ("${PROJECT_BINARY_DIR}") -# Include all files whose path match '${SEQAN3_CLONE_DIR}/include/seqan3/.*'. -seqan3_append_gcovr_args ("--filter" "${SEQAN3_CLONE_DIR}/include/seqan3") -# Include all files whose path match '${SEQAN3_CLONE_DIR}/test/include/seqan3/test/.*'. -seqan3_append_gcovr_args ("--filter" "${SEQAN3_CLONE_DIR}/test/include/seqan3/test") -# Remove all files whose path match '${SEQAN3_CLONE_DIR}/include/seqan3/contrib/.*'. -seqan3_append_gcovr_args ("--exclude" "${SEQAN3_CLONE_DIR}/include/seqan3/contrib") -# Remove all files whose path match '${SEQAN3_CLONE_DIR}/include/seqan3/std/.*'. -seqan3_append_gcovr_args ("--exclude" "${SEQAN3_CLONE_DIR}/include/seqan3/std") -# Remove line coverage for all lines that match '^\s*$', i.e. empty lines. -seqan3_append_gcovr_args ("--exclude-lines-by-pattern" [['^\\s*$']]) -# Remove line coverage for all lines that match "^\s*[{}]{0,2}\s*;*\s*(//.*)?$", i.e. lines with a single '{' or '}' -# or a combination of those (max 2) which might be followed by a semicolon or a comment '//'. -seqan3_append_gcovr_args ("--exclude-lines-by-pattern" [['^\\s*[{}]{0,2}\\s*;*\\s*(//.*)?$']]) -# Will exclude branches that are unreachable. -seqan3_append_gcovr_args ("--exclude-unreachable-branches") -# Will exclude branches that are only generated for exception handling. -seqan3_append_gcovr_args ("--exclude-throw-branches") -# Will exclude non-code lines, e.g. lines with closing braces. -seqan3_append_gcovr_args ("--exclude-noncode-lines") -# Run up to this many gcov instances in parallel. -seqan3_append_gcovr_args ("-j" "${SEQAN3_COVERAGE_PARALLEL_LEVEL}") - -add_custom_command (OUTPUT ${PROJECT_BINARY_DIR}/seqan3_coverage.xml - # Run tests. - COMMAND ${CMAKE_CTEST_COMMAND} -j ${SEQAN3_COVERAGE_PARALLEL_LEVEL} --output-on-failure - # Run gcovr and create XML report. - COMMAND ${GCOVR_COMMAND} ${SEQAN3_GCOVR_ARGUMENTS} --xml --output - ${PROJECT_BINARY_DIR}/seqan3_coverage.xml - WORKING_DIRECTORY ${PROJECT_BINARY_DIR} - COMMENT "Processing code coverage counters and generating XML report." - COMMAND_EXPAND_LISTS) - -add_custom_target (coverage ALL DEPENDS ${PROJECT_BINARY_DIR}/seqan3_coverage.xml) - -add_custom_command (OUTPUT ${PROJECT_BINARY_DIR}/html/index.html - # Run tests. - COMMAND ${CMAKE_CTEST_COMMAND} -j ${SEQAN3_COVERAGE_PARALLEL_LEVEL} --output-on-failure - # Create output directory. - COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/html/ - # Run gcovr and create HTML report. - COMMAND ${GCOVR_COMMAND} ${SEQAN3_GCOVR_ARGUMENTS} --html-details --output - ${PROJECT_BINARY_DIR}/html/index.html - WORKING_DIRECTORY ${PROJECT_BINARY_DIR} - COMMENT "Processing code coverage counters and generating HTML report." - COMMAND_EXPAND_LISTS) - -add_custom_target (coverage_html - DEPENDS ${PROJECT_BINARY_DIR}/html/index.html - COMMENT "Generate coverage report.") - -add_custom_command (TARGET coverage_html - POST_BUILD - COMMAND ; - COMMENT "Open ${PROJECT_BINARY_DIR}/html/index.html in your browser to view the coverage report.") - -macro (seqan3_test unit_test_cpp) - file (RELATIVE_PATH unit_test "${CMAKE_SOURCE_DIR}/../unit" "${CMAKE_CURRENT_LIST_DIR}/${unit_test_cpp}") - seqan3_test_component (target "${unit_test}" TARGET_NAME) - seqan3_test_component (test_name "${unit_test}" TEST_NAME) - - add_executable (${target} ${unit_test_cpp}) - target_link_libraries (${target} seqan3::test::coverage) - add_test (NAME "${test_name}" COMMAND ${target}) - - # any change of a target will invalidate the coverage result; - # NOTE that this is a GLOBAL variable, because a normal - # `set(GLOBAL_TEST_COVERAGE_ALL_TESTS)` would not propagate the result when - # CMakeLists.txt goes out of scope due to a `add_subdirectory` - set_property (GLOBAL APPEND PROPERTY GLOBAL_TEST_COVERAGE_ALL_TESTS ${target}) - - unset (unit_test) - unset (target) - unset (test_name) -endmacro () - -seqan3_require_ccache () -seqan3_require_test () - -# add all unit tests -add_subdirectories_of ("${CMAKE_CURRENT_SOURCE_DIR}/../unit") - -# add collected test cases as dependency -get_property (TEST_COVERAGE_ALL_TESTS GLOBAL PROPERTY GLOBAL_TEST_COVERAGE_ALL_TESTS) -add_custom_command (OUTPUT ${PROJECT_BINARY_DIR}/seqan3_coverage.xml - DEPENDS ${TEST_COVERAGE_ALL_TESTS} - APPEND) +# Add a custom build type: Coverage +# +# `--coverage` is equivalent to `-fprofile-arcs -ftest-coverage` +# https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-gcov +# +# `-fprofile-update=atomic` prevents profile corruption in multi-threaded tests +# https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-update +# +# `-fprofile-abs-path` converts relative source file names to absolute paths in the coverage files +# https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-abs-path + +set (CMAKE_CXX_FLAGS_COVERAGE + "${CMAKE_CXX_FLAGS_DEBUG} --coverage -g -O0 -fprofile-abs-path -fprofile-update=atomic" + CACHE STRING "Flags used by the C++ compiler during coverage builds." FORCE) +set (CMAKE_C_FLAGS_COVERAGE + "${CMAKE_C_FLAGS_DEBUG} --coverage -g -O0 -fprofile-abs-path -fprofile-update=atomic" + CACHE STRING "Flags used by the C compiler during coverage builds." FORCE) +set (CMAKE_EXE_LINKER_FLAGS_COVERAGE + "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Wl,-lgcov" + CACHE STRING "Flags used for linking binaries during coverage builds." FORCE) +set (CMAKE_SHARED_LINKER_FLAGS_COVERAGE + "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -Wl,-lgcov" + CACHE STRING "Flags used by the shared libraries linker during coverage builds." FORCE) + +mark_as_advanced (CMAKE_CXX_FLAGS_COVERAGE CMAKE_C_FLAGS_COVERAGE CMAKE_EXE_LINKER_FLAGS_COVERAGE + CMAKE_SHARED_LINKER_FLAGS_COVERAGE) + +enable_testing () +add_subdirectory ("../unit" "${CMAKE_CURRENT_BINARY_DIR}/unit") diff --git a/test/external_project/CMakeLists.txt b/test/external_project/CMakeLists.txt index 6b42b8ea83..c3e30b753f 100644 --- a/test/external_project/CMakeLists.txt +++ b/test/external_project/CMakeLists.txt @@ -18,13 +18,6 @@ endif () option (SEQAN3_EXTERNAL_PROJECT_FIND_DEBUG_MODE "Enable this option if you want to get a detailed list which paths were considered for find_package(...)" false) -if (NOT ${CMAKE_VERSION} VERSION_LESS 3.14) # cmake 3.14 version is needed to install cmake 3.5. - set (SEQAN3_EXTERNAL_PROJECT_CMAKE_COMMAND "${CMAKE_COMMAND}") - include (use-cmake3.5.cmake) # ensure that seqan3 can be used with cmake 3.5 -else () - set (SEQAN3_EXTERNAL_PROJECT_CMAKE_COMMAND "${CMAKE_COMMAND}") -endif () - # Here is an explanation of what happens: # # If your current CMake version is < 3.14, we @@ -51,7 +44,6 @@ ExternalProject_Add ( seqan3_submodule_add_subdirectory PREFIX seqan3_submodule_add_subdirectory SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/seqan3_submodule_add_subdirectory" - CMAKE_COMMAND "${SEQAN3_EXTERNAL_PROJECT_CMAKE_COMMAND}" CMAKE_ARGS ${SEQAN3_EXTERNAL_PROJECT_CMAKE_ARGS} "-DCMAKE_FIND_DEBUG_MODE=${SEQAN3_EXTERNAL_PROJECT_FIND_DEBUG_MODE}" # "-DSEQAN3_ROOT=${SEQAN3_ROOT}") @@ -65,7 +57,6 @@ ExternalProject_Add ( seqan3_submodule_find_package PREFIX seqan3_submodule_find_package SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/seqan3_submodule_find_package" - CMAKE_COMMAND "${SEQAN3_EXTERNAL_PROJECT_CMAKE_COMMAND}" CMAKE_ARGS ${SEQAN3_EXTERNAL_PROJECT_CMAKE_ARGS} "-DCMAKE_FIND_DEBUG_MODE=${SEQAN3_EXTERNAL_PROJECT_FIND_DEBUG_MODE}" "-DCMAKE_PREFIX_PATH=${SEQAN3_ROOT}/build_system") @@ -86,7 +77,6 @@ if (NOT ${CMAKE_VERSION} VERSION_LESS 3.14) # cmake 3.14 version is needed to in seqan3_installed PREFIX seqan3_installed SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/seqan3_installed" - CMAKE_COMMAND "${SEQAN3_EXTERNAL_PROJECT_CMAKE_COMMAND}" CMAKE_ARGS ${SEQAN3_EXTERNAL_PROJECT_CMAKE_ARGS} "-DCMAKE_FIND_DEBUG_MODE=${SEQAN3_EXTERNAL_PROJECT_FIND_DEBUG_MODE}" "-DCMAKE_SYSTEM_PREFIX_PATH=${SEQAN3_SYSTEM_PREFIX}") @@ -117,7 +107,6 @@ ExternalProject_Add ( seqan3_setup_tutorial PREFIX seqan3_setup_tutorial SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/seqan3_setup_tutorial" - CMAKE_COMMAND "${SEQAN3_EXTERNAL_PROJECT_CMAKE_COMMAND}" CMAKE_ARGS ${SEQAN3_EXTERNAL_PROJECT_CMAKE_ARGS} "-DCMAKE_FIND_DEBUG_MODE=${SEQAN3_EXTERNAL_PROJECT_FIND_DEBUG_MODE}") @@ -136,7 +125,6 @@ ExternalProject_Add ( seqan3_setup_tutorial_with_sharg_installed PREFIX seqan3_setup_tutorial_with_sharg_installed SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/seqan3_setup_tutorial_with_sharg_installed" - CMAKE_COMMAND "${SEQAN3_EXTERNAL_PROJECT_CMAKE_COMMAND}" CMAKE_ARGS ${SEQAN3_EXTERNAL_PROJECT_CMAKE_ARGS} "-DCMAKE_FIND_DEBUG_MODE=${SEQAN3_EXTERNAL_PROJECT_FIND_DEBUG_MODE}" "-DCMAKE_SYSTEM_PREFIX_PATH=${SEQAN3_SYSTEM_PREFIX}") diff --git a/test/external_project/install-sharg.cmake b/test/external_project/install-sharg.cmake index 1a138ff83e..9c08688c75 100644 --- a/test/external_project/install-sharg.cmake +++ b/test/external_project/install-sharg.cmake @@ -4,6 +4,11 @@ cmake_minimum_required (VERSION 3.14) +# https://cmake.org/cmake/help/latest/policy/CMP0135.html +if (POLICY CMP0135) + cmake_policy (SET CMP0135 NEW) +endif () + # We can only set one CMAKE_SYSTEM_PREFIX_PATH, i.e. it cannot be a list. # Hence we need to reuse the SEQAN3_SYSTEM_PREFIX. if (NOT DEFINED SEQAN3_SYSTEM_PREFIX) diff --git a/test/external_project/use-cmake3.5.cmake b/test/external_project/use-cmake3.5.cmake deleted file mode 100644 index c8f9954db6..0000000000 --- a/test/external_project/use-cmake3.5.cmake +++ /dev/null @@ -1,32 +0,0 @@ -# SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin -# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik -# SPDX-License-Identifier: BSD-3-Clause - -cmake_minimum_required (VERSION 3.14) -project (seqan3_test_seqan3_config CXX) - -# require Linux and x86_64 -if (NOT (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SIZEOF_VOID_P EQUAL 8)) - message (STATUS "cmake 3.5 test requires Linux and x86_64") - return () -endif () - -include (FetchContent) -FetchContent_Declare ( - cmake35 - URL "https://github.com/Kitware/CMake/releases/download/v3.5.2/cmake-3.5.2-Linux-x86_64.tar.gz" - URL_HASH "SHA256=5f7aeaebe33521647625e0411467de71a2886743e4aa2c179e04c9e141c6c8cd") -FetchContent_MakeAvailable (cmake35) - -set (cmake35_command "${cmake35_SOURCE_DIR}/bin/cmake") - -execute_process (COMMAND ${cmake35_command} --version - RESULT_VARIABLE cmake35_result - OUTPUT_VARIABLE cmake35_output) - -if ("${cmake35_result}" STREQUAL "0" AND cmake35_output MATCHES "cmake version 3.5.2") - set (SEQAN3_EXTERNAL_PROJECT_CMAKE_COMMAND "${cmake35_command}") - message (STATUS "Use cmake3.5 in tests [${cmake35_command}]") -else () - message (AUTHOR_WARNING "Couldn't execute cmake3.5 --version [${cmake35_command}]") -endif () diff --git a/test/include/seqan3/test/expect_range_eq.hpp b/test/include/seqan3/test/expect_range_eq.hpp index bb4782fe7b..c816ae4f61 100644 --- a/test/include/seqan3/test/expect_range_eq.hpp +++ b/test/include/seqan3/test/expect_range_eq.hpp @@ -29,7 +29,7 @@ struct expect_range_eq { using value_t = std::ranges::range_value_t; std::vector rng_copy{}; - std::ranges::copy(rng, std::back_inserter(rng_copy)); + std::ranges::copy(std::forward(rng), std::back_inserter(rng_copy)); return rng_copy; } diff --git a/test/seqan3-test.cmake b/test/seqan3-test.cmake index 5e665e98c0..71a4d69268 100644 --- a/test/seqan3-test.cmake +++ b/test/seqan3-test.cmake @@ -97,24 +97,6 @@ if (NOT TARGET seqan3::test::unit) add_library (seqan3::test::unit ALIAS seqan3_test_unit) endif () -# seqan3::test::coverage specifies required flags, includes and libraries -# needed for coverage test cases in seqan3/test/coverage -if (NOT TARGET seqan3::test::coverage) - add_library (seqan3_test_coverage INTERFACE) - target_compile_options (seqan3_test_coverage INTERFACE "--coverage" "-fprofile-arcs" "-ftest-coverage") - # -fprofile-abs-path requires at least gcc8, it forces gcov to report absolute instead of relative paths. - # gcovr has trouble detecting the headers otherwise. - # ccache is not aware of this option, so it needs to be skipped with `--ccache-skip`. - find_program (CCACHE_PROGRAM ccache) - if (CCACHE_PROGRAM) - target_compile_options (seqan3_test_coverage INTERFACE "--ccache-skip" "-fprofile-abs-path") - else () - target_compile_options (seqan3_test_coverage INTERFACE "-fprofile-abs-path") - endif () - target_link_libraries (seqan3_test_coverage INTERFACE "seqan3::test::unit" "gcov") - add_library (seqan3::test::coverage ALIAS seqan3_test_coverage) -endif () - # seqan3::test::header specifies required flags, includes and libraries # needed for header test cases in seqan3/test/header if (NOT TARGET seqan3::test::header) diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index a670271aa9..cbada2e933 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -12,7 +12,7 @@ include (diagnostics/list_missing_unit_tests) include (diagnostics/list_unused_unit_tests) include (include_dependencies/add_include_dependencies) -option (SEQAN3_VERBOSE_TESTS "Run each test case individually" ON) +option (SEQAN3_VERBOSE_TESTS "Run each test case individually" OFF) option (SEQAN3_USE_INCLUDE_DEPENDENCIES "Build tests in an hierarchical order (by an include graph, i.e. tests with less dependencies are build first)" OFF)