mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Pass %p to LLVM_PROFILE_FILE instead of wrapper
This commit is contained in:
2
.github/build.sh
vendored
2
.github/build.sh
vendored
@@ -32,7 +32,7 @@ sudo make install
|
|||||||
/usr/local/bin/znc --version
|
/usr/local/bin/znc --version
|
||||||
|
|
||||||
# TODO: use DEVEL_COVER_OPTIONS for https://metacpan.org/pod/Devel::Cover
|
# 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
|
ls -lRa
|
||||||
|
|
||||||
~/perl5/bin/cover --no-gcov --report=clover
|
~/perl5/bin/cover --no-gcov --report=clover
|
||||||
|
|||||||
@@ -102,7 +102,6 @@ add_custom_target(inttest COMMAND
|
|||||||
# znc-buildmod should use the correct compiler.
|
# znc-buildmod should use the correct compiler.
|
||||||
# https://bugs.gentoo.org/699258 is an example of how it can go wrong.
|
# https://bugs.gentoo.org/699258 is an example of how it can go wrong.
|
||||||
${CMAKE_COMMAND} -E env MAKEFLAGS= CXX=${CMAKE_CXX_COMPILER}
|
${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"
|
"${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)
|
add_dependencies(inttest inttest_bin)
|
||||||
|
|||||||
@@ -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)
|
|
||||||
Reference in New Issue
Block a user