Separate tests into unit & integration

Summary:
- Separate tests into unit & integration

- Update paths in workflows

- Cut test execution time

Reviewers: ivica

Reviewed By: ivica

Subscribers: miljen, iljazovic

Differential Revision: https://repo.mireo.local/D27374
This commit is contained in:
Korina Šimičević
2024-01-16 11:45:23 +01:00
parent e3eb408c98
commit 2f6751d162
27 changed files with 884 additions and 855 deletions
+6 -6
View File
@@ -96,15 +96,15 @@ jobs:
- name: Build tests
run: |
cmake -S test\\unit -B test\\unit\\build -A ${{ matrix.architecture }} ^
cmake -S test -B test\\build -A ${{ matrix.architecture }} ^
-DCMAKE_CXX_FLAGS="${{ env.CXXFLAGS }}" -DCMAKE_EXE_LINKER_FLAGS="${{ env.LDFLAGS }}" ^
-DCMAKE_CXX_STANDARD="${{ matrix.cxxstd }}" -DCMAKE_BUILD_TYPE="${{ matrix.build-type }}" ^
-DBoost_INCLUDE_DIR="${{ github.workspace }}\\boost_${{ env.BOOST_DIR_VER_NAME }}"
cmake --build test\\unit\\build -j 4
cmake --build test\\build -j 4
- name: Run tests
run: |
.\\test\\unit\\build\\${{ matrix.build-type }}\\mqtt-test.exe --log_level=test_suite
.\\test\\build\\${{ matrix.build-type }}\\mqtt-test.exe --log_level=test_suite
posix:
name: "${{ matrix.toolset }} std=c++${{ matrix.cxxstd }} ${{ matrix.build-type }}"
@@ -193,11 +193,11 @@ jobs:
- name: Build tests
run: |
cmake -S test/unit -B test/unit/build \
cmake -S test -B test/build \
-DCMAKE_CXX_COMPILER="${{ matrix.compiler }}" -DCMAKE_CXX_FLAGS="${{ env.CXXFLAGS }}" \
-DCMAKE_CXX_STANDARD="${{ matrix.cxxstd }}" -DCMAKE_EXE_LINKER_FLAGS="${{ env.LDFLAGS }}" -DCMAKE_BUILD_TYPE="${{ matrix.build-type }}" \
-DBoost_INCLUDE_DIR="/usr/local/boost_${{ env.BOOST_DIR_VER_NAME }}"
cmake --build test/unit/build -j 4
cmake --build test/build -j 4
- name: Run tests
run: ./test/unit/build/mqtt-test --log_level=test_suite
run: ./test/build/mqtt-test --log_level=test_suite
+4 -4
View File
@@ -60,17 +60,17 @@ jobs:
- name: Build tests
run: |
cmake -S test/unit -B test/unit/build -DCMAKE_CXX_COMPILER="${{ matrix.compiler }}" -DCMAKE_CXX_FLAGS="${{ matrix.cxxflags }}" \
cmake -S test -B test/build -DCMAKE_CXX_COMPILER="${{ matrix.compiler }}" -DCMAKE_CXX_FLAGS="${{ matrix.cxxflags }}" \
-DCMAKE_EXE_LINKER_FLAGS="${{ matrix.ldflags }}" -DCMAKE_BUILD_TYPE="Coverage" \
-DBoost_INCLUDE_DIR="/usr/local/boost_${{ env.BOOST_DIR_VER_NAME }}"
cmake --build test/unit/build -j 4
cmake --build test/build -j 4
- name: Run tests
run: ./test/unit/build/mqtt-test --log_level=test_suite
run: ./test/build/mqtt-test --log_level=test_suite
- name: Generate Coverage Report
run: |
lcov --capture --output-file coverage.info --directory test/unit/build
lcov --capture --output-file coverage.info --directory test/build
lcov --remove coverage.info '/usr/include/*' --output-file coverage.info
lcov --remove coverage.info '**/test/*' --output-file coverage.info
lcov --remove coverage.info '**/boost/*' --output-file coverage.info