Skip to content

Commit

Permalink
run test/cli Python tests from root dir now they are location-indep…
Browse files Browse the repository at this point in the history
…endent
  • Loading branch information
firewave committed Nov 13, 2024
1 parent 8e6e0b8 commit 1f29c4d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 33 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/CI-unixish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,27 +81,22 @@ jobs:
# 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
ln -s cppcheck 'cpp check'
cd 'cpp check/test/cli'
python3 -m pytest -Werror --strict-markers -vv
python3 -m pytest -Werror --strict-markers -vv 'cpp check/test/cli'
# do not use pushd in this step since we go below the working directory
- 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

Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/CI-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,23 +124,20 @@ 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

# TODO: install clang
- 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

Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/asan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,20 @@ 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

- name: Run test/cli (--clang)
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

Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/tsan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,25 +99,22 @@ 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

- name: Run test/cli (--clang)
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

Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/ubsan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,23 +99,20 @@ 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

- name: Run test/cli (--clang)
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

Expand Down

0 comments on commit 1f29c4d

Please sign in to comment.