[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:
Thiago Marcos P. Santos
2016-08-26 16:03:09 +03:00
parent 9605cac3e9
commit 7a2bfe32f8
2 changed files with 12 additions and 0 deletions

View File

@@ -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
)

View File

@@ -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>