diff --git a/.github/build.sh b/.github/build.sh index b3ecfb45..5c4cabae 100644 --- a/.github/build.sh +++ b/.github/build.sh @@ -32,7 +32,7 @@ sudo make install /usr/local/bin/znc --version # TODO: use DEVEL_COVER_OPTIONS for https://metacpan.org/pod/Devel::Cover -env LLVM_PROFILE_FILE="$PWD/inttest.profraw" ZNC_MODPERL_COVERAGE_OPTS="-db,$PWD/cover_db" PYTHONWARNINGS=error make VERBOSE=1 inttest +env LLVM_PROFILE_FILE="$PWD/inttest.profraw.%p" ZNC_MODPERL_COVERAGE_OPTS="-db,$PWD/cover_db" PYTHONWARNINGS=error make VERBOSE=1 inttest ls -lRa ~/perl5/bin/cover --no-gcov --report=clover diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 827cdb86..780a7fb6 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -102,7 +102,6 @@ add_custom_target(inttest COMMAND # znc-buildmod should use the correct compiler. # https://bugs.gentoo.org/699258 is an example of how it can go wrong. ${CMAKE_COMMAND} -E env MAKEFLAGS= CXX=${CMAKE_CXX_COMPILER} - "INTTEST_BIN=${CMAKE_CURRENT_BINARY_DIR}/integration/inttest" "${PROJECT_SOURCE_DIR}/third_party/gtest-parallel/gtest-parallel" - "${CMAKE_CURRENT_SOURCE_DIR}/integration/wrapper.py") + "${CMAKE_CURRENT_BINARY_DIR}/integration/inttest") add_dependencies(inttest inttest_bin) diff --git a/test/integration/wrapper.py b/test/integration/wrapper.py deleted file mode 100755 index efa707a9..00000000 --- a/test/integration/wrapper.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python3 -# -# Copyright (C) 2004-2025 ZNC, see the NOTICE file for details. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# The purpose of this file is to fix LLVM profiler data in the parallel -# execution of the test - all of them write to the same file, so it races and -# produces invalid data - -import os -import sys -import re - -test = '' -for arg in sys.argv: - m = re.match(r'--gtest_filter=(.*)', arg) - if m: - test = m[1] - break - -if test != '' and 'LLVM_PROFILE_FILE' in os.environ: - os.environ['LLVM_PROFILE_FILE'] += '.' + test - -binary = os.environ['INTTEST_BIN'] -sys.argv[0] = binary - -os.execv(binary, sys.argv)