diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 64dd218..7d0d813 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,8 +46,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - name: Run pytest tests - run: mkdir build && cd build && cmake .. -DXCP_ENABLE_TEST=ON && make all && LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/project/build" ctest -V;gcov _cffi_xcp.c + run: ./test.sh - name: Upload code coverage to Codecov + if: success() || failure() uses: codecov/codecov-action@v1 with: files: ./build/Xcp.c.gcov diff --git a/test.sh b/test.sh new file mode 100644 index 0000000..3a4078e --- /dev/null +++ b/test.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +result=0 +mkdir -p build +cd build +cmake .. -DXCP_ENABLE_TEST=ON +make all +LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/project/build" ctest -V +result=$? +gcov _cffi_xcp.c +exit $result diff --git a/test/asam_error_matrix_test.py b/test/asam_error_matrix_test.py index cdd0e8b..8af278f 100644 --- a/test/asam_error_matrix_test.py +++ b/test/asam_error_matrix_test.py @@ -891,9 +891,9 @@ def test_build_checksum_err_out_of_range(self): handle.lib.Xcp_MainFunction() assert tuple(handle.can_if_transmit.call_args[0][1].SduDataPtr[0:2]) == (0xFE, 0x22) - @pytest.mark.skip(reason='the memory mapping must be known in order to check if the provided address is correct...') + # @pytest.mark.skip(reason='the memory mapping must be known in order to check if the provided address is correct...') def test_build_checksum_err_access_denied(self): - pass + pytest.fail('intentionally failing test for CI test') @pytest.mark.skip(reason='XCP protocol layer specification 1.0 - 1.6.1.1.3: standard commands are never protected') def test_build_checksum_err_access_locked(self):