run more tests in sanitizer workflows (#5744)
This commit is contained in:
parent
22613dc7fb
commit
1135520aa8
|
@ -42,7 +42,7 @@ jobs:
|
||||||
- name: Install missing software on ubuntu
|
- name: Install missing software on ubuntu
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y cmake make libpcre3-dev libboost-container-dev
|
sudo apt-get install -y cmake make libpcre3-dev libboost-container-dev libxml2-utils
|
||||||
|
|
||||||
- name: Install clang
|
- name: Install clang
|
||||||
run: |
|
run: |
|
||||||
|
@ -59,6 +59,12 @@ jobs:
|
||||||
modules: 'qtcharts'
|
modules: 'qtcharts'
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
|
- name: Install missing Python packages
|
||||||
|
run: |
|
||||||
|
python3 -m pip install pip --upgrade
|
||||||
|
python3 -m pip install pytest
|
||||||
|
python3 -m pip install pytest-timeout
|
||||||
|
|
||||||
# TODO: disable all warnings
|
# TODO: disable all warnings
|
||||||
- name: CMake
|
- name: CMake
|
||||||
run: |
|
run: |
|
||||||
|
@ -78,6 +84,22 @@ jobs:
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: ./cmake.output/bin/testrunner
|
run: ./cmake.output/bin/testrunner
|
||||||
|
|
||||||
|
- name: Run cfg tests
|
||||||
|
run: |
|
||||||
|
cmake --build cmake.output --target checkcfg -- -j $(nproc)
|
||||||
|
|
||||||
|
# TODO: we should use CTest instead to parallelize tests but the start-up overhead will slow things down
|
||||||
|
- name: Run CTest
|
||||||
|
if: false
|
||||||
|
run: |
|
||||||
|
ctest --test-dir cmake.output --output-on-failure -j$(nproc)
|
||||||
|
|
||||||
|
- name: Run test/cli
|
||||||
|
run: |
|
||||||
|
pwd=$(pwd)
|
||||||
|
cd test/cli
|
||||||
|
TEST_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv test-*.py
|
||||||
|
|
||||||
- name: Generate dependencies
|
- name: Generate dependencies
|
||||||
if: false
|
if: false
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -42,7 +42,7 @@ jobs:
|
||||||
- name: Install missing software on ubuntu
|
- name: Install missing software on ubuntu
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y cmake make libpcre3-dev libboost-container-dev
|
sudo apt-get install -y cmake make libpcre3-dev libboost-container-dev libxml2-utils
|
||||||
|
|
||||||
- name: Install clang
|
- name: Install clang
|
||||||
run: |
|
run: |
|
||||||
|
@ -59,6 +59,12 @@ jobs:
|
||||||
modules: 'qtcharts'
|
modules: 'qtcharts'
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
|
- name: Install missing Python packages
|
||||||
|
run: |
|
||||||
|
python3 -m pip install pip --upgrade
|
||||||
|
python3 -m pip install pytest
|
||||||
|
python3 -m pip install pytest-timeout
|
||||||
|
|
||||||
- name: CMake
|
- name: CMake
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B cmake.output -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=Off -DWITH_QCHART=Off -DUSE_MATCHCOMPILER=Verify -DANALYZE_THREAD=On -DUSE_THREADS=On -DENABLE_CHECK_INTERNAL=On -DUSE_BOOST=On -DCPPCHK_GLIBCXX_DEBUG=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=Off -DDISABLE_DMAKE=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
cmake -S . -B cmake.output -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=Off -DWITH_QCHART=Off -DUSE_MATCHCOMPILER=Verify -DANALYZE_THREAD=On -DUSE_THREADS=On -DENABLE_CHECK_INTERNAL=On -DUSE_BOOST=On -DCPPCHK_GLIBCXX_DEBUG=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=Off -DDISABLE_DMAKE=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||||
|
@ -77,6 +83,22 @@ jobs:
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: ./cmake.output/bin/testrunner
|
run: ./cmake.output/bin/testrunner
|
||||||
|
|
||||||
|
- name: Run cfg tests
|
||||||
|
run: |
|
||||||
|
cmake --build cmake.output --target checkcfg -- -j $(nproc)
|
||||||
|
|
||||||
|
# TODO: we should use CTest instead to parallelize tests but the start-up overhead will slow things down
|
||||||
|
- name: Run CTest
|
||||||
|
if: false
|
||||||
|
run: |
|
||||||
|
ctest --test-dir cmake.output --output-on-failure -j$(nproc)
|
||||||
|
|
||||||
|
- name: Run test/cli
|
||||||
|
run: |
|
||||||
|
pwd=$(pwd)
|
||||||
|
cd test/cli
|
||||||
|
TEST_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv test-*.py
|
||||||
|
|
||||||
- name: Generate dependencies
|
- name: Generate dependencies
|
||||||
if: false
|
if: false
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -42,7 +42,7 @@ jobs:
|
||||||
- name: Install missing software on ubuntu
|
- name: Install missing software on ubuntu
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y cmake make libpcre3-dev libboost-container-dev
|
sudo apt-get install -y cmake make libpcre3-dev libboost-container-dev libxml2-utils
|
||||||
|
|
||||||
- name: Install clang
|
- name: Install clang
|
||||||
run: |
|
run: |
|
||||||
|
@ -58,6 +58,12 @@ jobs:
|
||||||
modules: 'qtcharts'
|
modules: 'qtcharts'
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
|
- name: Install missing Python packages
|
||||||
|
run: |
|
||||||
|
python3 -m pip install pip --upgrade
|
||||||
|
python3 -m pip install pytest
|
||||||
|
python3 -m pip install pytest-timeout
|
||||||
|
|
||||||
# TODO: disable warnings
|
# TODO: disable warnings
|
||||||
- name: CMake
|
- name: CMake
|
||||||
run: |
|
run: |
|
||||||
|
@ -77,6 +83,22 @@ jobs:
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: ./cmake.output/bin/testrunner
|
run: ./cmake.output/bin/testrunner
|
||||||
|
|
||||||
|
- name: Run cfg tests
|
||||||
|
run: |
|
||||||
|
cmake --build cmake.output --target checkcfg -- -j $(nproc)
|
||||||
|
|
||||||
|
# TODO: we should use CTest instead to parallelize tests but the start-up overhead will slow things down
|
||||||
|
- name: Run CTest
|
||||||
|
if: false
|
||||||
|
run: |
|
||||||
|
ctest --test-dir cmake.output --output-on-failure -j$(nproc)
|
||||||
|
|
||||||
|
- name: Run test/cli
|
||||||
|
run: |
|
||||||
|
pwd=$(pwd)
|
||||||
|
cd test/cli
|
||||||
|
TEST_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv test-*.py
|
||||||
|
|
||||||
- name: Generate dependencies
|
- name: Generate dependencies
|
||||||
run: |
|
run: |
|
||||||
# make sure auto-generated GUI files exist
|
# make sure auto-generated GUI files exist
|
||||||
|
|
|
@ -51,15 +51,24 @@ def __lookup_cppcheck_exe():
|
||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
exe_name += ".exe"
|
exe_name += ".exe"
|
||||||
|
|
||||||
for base in (script_path + '/../../', './'):
|
exe_path = None
|
||||||
for path in ('', 'bin/', 'bin/debug/'):
|
|
||||||
exe_path = base + path + exe_name
|
if 'TEST_CPPCHECK_EXE_LOOKUP_PATH' in os.environ:
|
||||||
if os.path.isfile(exe_path):
|
lookup_paths = [os.environ['TEST_CPPCHECK_EXE_LOOKUP_PATH']]
|
||||||
|
else:
|
||||||
|
lookup_paths = [os.path.join(script_path, '..', '..'), '.']
|
||||||
|
|
||||||
|
for base in lookup_paths:
|
||||||
|
for path in ('', 'bin', os.path.join('bin', 'debug')):
|
||||||
|
tmp_exe_path = os.path.join(base, path, exe_name)
|
||||||
|
if os.path.isfile(tmp_exe_path):
|
||||||
|
exe_path = tmp_exe_path
|
||||||
|
break
|
||||||
|
|
||||||
|
if exe_path:
|
||||||
print("using '{}'".format(exe_path))
|
print("using '{}'".format(exe_path))
|
||||||
return exe_path
|
return exe_path
|
||||||
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
# Run Cppcheck with args
|
# Run Cppcheck with args
|
||||||
def cppcheck(args, env=None):
|
def cppcheck(args, env=None):
|
||||||
|
|
Loading…
Reference in New Issue