[tests] Make it possible to disable tests on the CI
Useful for tests that depend on a good network connection and you want to run manually.
This commit is contained in:
@@ -16,6 +16,12 @@ target_include_directories(mbgl-test
|
||||
PRIVATE platform/default
|
||||
)
|
||||
|
||||
if(DEFINED ENV{CI})
|
||||
target_compile_definitions(mbgl-test
|
||||
PRIVATE -DCI_BUILD=1
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(mbgl-test
|
||||
PRIVATE mbgl-core
|
||||
)
|
||||
|
||||
@@ -36,6 +36,12 @@
|
||||
#define TEST_REQUIRES_SERVER(name) DISABLED_ ## name
|
||||
#endif
|
||||
|
||||
#if !CI_BUILD
|
||||
#define TEST_DISABLED_ON_CI(name) name
|
||||
#else
|
||||
#define TEST_DISABLED_ON_CI(name) DISABLED_ ## name
|
||||
#endif
|
||||
|
||||
#include <mbgl/util/image.hpp>
|
||||
#include <mbgl/util/chrono.hpp>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user