Skip to content

Commit

Permalink
USE_CPP_TEST_SERVER for Linux C++ tests (#1605)
Browse files Browse the repository at this point in the history
  • Loading branch information
louwers authored Sep 5, 2023
1 parent ea543e1 commit 9cfb695
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
CI: 1
run: |
cmake --version
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Debug -DMLN_WITH_CLANG_TIDY=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DMLN_WITH_COVERAGE=ON ${{ env.renderer_flag_cmake }}
CI=1 cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Debug -DMLN_WITH_CLANG_TIDY=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DMLN_WITH_COVERAGE=ON ${{ env.renderer_flag_cmake }}
cmake --build build --target mbgl-core mbgl-test-runner mbgl-render-test-runner mbgl-expression-test
- name: Perform CodeQL Analysis
Expand Down Expand Up @@ -125,11 +125,6 @@ jobs:

- run: chmod +x ./mbgl-test-runner

- name: Install npm packages and run test server in background
run: |
npm install
node test/storage/server.js &
- name: Run C++ tests
run: xvfb-run -a ./mbgl-test-runner

Expand Down
7 changes: 7 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,10 @@ set_property(TARGET mbgl-test PROPERTY FOLDER Core)
if (MLN_WITH_CLANG_TIDY)
set_target_properties(mbgl-test PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND}")
endif()

if (CMAKE_SYSTEM_NAME STREQUAL Linux)
target_compile_definitions(
mbgl-test
PRIVATE USE_CPP_TEST_SERVER
)
endif()

0 comments on commit 9cfb695

Please sign in to comment.