diff --git a/.github/workflows/CI-unixish.yml b/.github/workflows/CI-unixish.yml index cd7779ec937..898781f2537 100644 --- a/.github/workflows/CI-unixish.yml +++ b/.github/workflows/CI-unixish.yml @@ -309,30 +309,37 @@ jobs: run: | tools/generate_and_run_more_tests.sh - # do not use pushd in this step since we go below the working directory - name: Run test/cli run: | - cd test/cli - python3 -m pytest -Werror --strict-markers -vv - cd ../../.. + python3 -m pytest -Werror --strict-markers -vv test/cli + + # TODO: use the step below instead + # do not use pushd in this step since we go below the working directory + - name: Run test/cli (symlink) + run: | + cd .. ln -s cppcheck 'cpp check' cd 'cpp check/test/cli' python3 -m pytest -Werror --strict-markers -vv - # do not use pushd in this step since we go below the working directory + # FIXME: proj2_test.py fails because of the relative path cleanups in ImportProject::setRelativePaths() + # It fails because the application path used as base path has its symlink resolved by getcwd(). + - name: Run test/cli (symlink) + if: false + run: | + ln -s . 'cpp check' + python3 -m pytest -Werror --strict-markers -vv 'cpp check/test/cli' + - name: Run test/cli (-j2) run: | - cd test/cli - python3 -m pytest -Werror --strict-markers -vv + python3 -m pytest -Werror --strict-markers -vv test/cli env: TEST_CPPCHECK_INJECT_J: 2 - # do not use pushd in this step since we go below the working directory - name: Run test/cli (--clang) if: false run: | - cd test/cli - python3 -m pytest -Werror --strict-markers -vv + python3 -m pytest -Werror --strict-markers -vv test/cli env: TEST_CPPCHECK_INJECT_CLANG: clang diff --git a/.github/workflows/CI-windows.yml b/.github/workflows/CI-windows.yml index de3a56b2f5e..3f0016c5c8c 100644 --- a/.github/workflows/CI-windows.yml +++ b/.github/workflows/CI-windows.yml @@ -172,14 +172,12 @@ jobs: - name: Run test/cli if: matrix.config == 'release' run: | - cd test/cli || exit /b !errorlevel! - python -m pytest -Werror --strict-markers -vv || exit /b !errorlevel! + python -m pytest -Werror --strict-markers -vv test/cli || exit /b !errorlevel! - name: Run test/cli (-j2) if: matrix.config == 'release' run: | - cd test/cli || exit /b !errorlevel! - python -m pytest -Werror --strict-markers -vv || exit /b !errorlevel! + python -m pytest -Werror --strict-markers -vv test/cli || exit /b !errorlevel! env: TEST_CPPCHECK_INJECT_J: 2 @@ -187,8 +185,7 @@ jobs: - name: Run test/cli (--clang) if: false # matrix.config == 'release' run: | - cd test/cli || exit /b !errorlevel! - python -m pytest -Werror --strict-markers -vv || exit /b !errorlevel! + python -m pytest -Werror --strict-markers -vv test/cli || exit /b !errorlevel! env: TEST_CPPCHECK_INJECT_CLANG: clang diff --git a/.github/workflows/asan.yml b/.github/workflows/asan.yml index 01bb06199d9..9ab471f9484 100644 --- a/.github/workflows/asan.yml +++ b/.github/workflows/asan.yml @@ -100,14 +100,12 @@ jobs: - 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_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv test/cli - name: Run test/cli (-j2) run: | pwd=$(pwd) - cd test/cli - TEST_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv + TEST_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv test/cli env: TEST_CPPCHECK_INJECT_J: 2 @@ -115,8 +113,7 @@ jobs: if: false run: | pwd=$(pwd) - cd test/cli - TEST_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv + TEST_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv test/cli env: TEST_CPPCHECK_INJECT_CLANG: clang diff --git a/.github/workflows/tsan.yml b/.github/workflows/tsan.yml index 6284de0743b..1cb54acb93f 100644 --- a/.github/workflows/tsan.yml +++ b/.github/workflows/tsan.yml @@ -99,16 +99,14 @@ jobs: - 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_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv test/cli env: TEST_CPPCHECK_INJECT_EXECUTOR: thread - name: Run test/cli (-j2) run: | pwd=$(pwd) - cd test/cli - TEST_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv + TEST_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv test/cli env: TEST_CPPCHECK_INJECT_J: 2 @@ -116,8 +114,7 @@ jobs: if: false run: | pwd=$(pwd) - cd test/cli - TEST_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv + TEST_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv test/cli env: TEST_CPPCHECK_INJECT_CLANG: clang diff --git a/.github/workflows/ubsan.yml b/.github/workflows/ubsan.yml index 4df9378cf15..c14dc27858a 100644 --- a/.github/workflows/ubsan.yml +++ b/.github/workflows/ubsan.yml @@ -99,14 +99,12 @@ jobs: - 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_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv test/cli - name: Run test/cli (-j2) run: | pwd=$(pwd) - cd test/cli - TEST_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv + TEST_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv test/cli env: TEST_CPPCHECK_INJECT_J: 2 @@ -114,8 +112,7 @@ jobs: if: false run: | pwd=$(pwd) - cd test/cli - TEST_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv + TEST_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv test/cli env: TEST_CPPCHECK_INJECT_CLANG: clang