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
|
||||
run: |
|
||||
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
|
||||
run: |
|
||||
|
@ -59,6 +59,12 @@ jobs:
|
|||
modules: 'qtcharts'
|
||||
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
|
||||
- name: CMake
|
||||
run: |
|
||||
|
@ -78,6 +84,22 @@ jobs:
|
|||
- name: Run tests
|
||||
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
|
||||
if: false
|
||||
run: |
|
||||
|
|
|
@ -42,7 +42,7 @@ jobs:
|
|||
- name: Install missing software on ubuntu
|
||||
run: |
|
||||
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
|
||||
run: |
|
||||
|
@ -59,6 +59,12 @@ jobs:
|
|||
modules: 'qtcharts'
|
||||
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
|
||||
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
|
||||
|
@ -77,6 +83,22 @@ jobs:
|
|||
- name: Run tests
|
||||
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
|
||||
if: false
|
||||
run: |
|
||||
|
|
|
@ -42,7 +42,7 @@ jobs:
|
|||
- name: Install missing software on ubuntu
|
||||
run: |
|
||||
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
|
||||
run: |
|
||||
|
@ -58,6 +58,12 @@ jobs:
|
|||
modules: 'qtcharts'
|
||||
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
|
||||
- name: CMake
|
||||
run: |
|
||||
|
@ -77,6 +83,22 @@ jobs:
|
|||
- name: Run tests
|
||||
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
|
||||
run: |
|
||||
# make sure auto-generated GUI files exist
|
||||
|
|
|
@ -51,15 +51,24 @@ def __lookup_cppcheck_exe():
|
|||
if sys.platform == "win32":
|
||||
exe_name += ".exe"
|
||||
|
||||
for base in (script_path + '/../../', './'):
|
||||
for path in ('', 'bin/', 'bin/debug/'):
|
||||
exe_path = base + path + exe_name
|
||||
if os.path.isfile(exe_path):
|
||||
exe_path = None
|
||||
|
||||
if 'TEST_CPPCHECK_EXE_LOOKUP_PATH' in os.environ:
|
||||
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))
|
||||
return exe_path
|
||||
|
||||
return None
|
||||
|
||||
|
||||
# Run Cppcheck with args
|
||||
def cppcheck(args, env=None):
|
||||
|
|
Loading…
Reference in New Issue