use INCLUDE_DISABLED_TESTS for disabling tests (#1077)

* use INCLUDE_DISABLED_TESTS for disabling tests
This commit is contained in:
Victor Vazquez 2020-12-04 10:58:52 -08:00 committed by GitHub
parent 9d3b488524
commit 3ca1104e91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View File

@ -26,10 +26,6 @@ endif()
include(GoogleTest)
# This symbol helps to disable tests by adding a pre-processor condition `#if !defined(TEST_DISABLED)`
# The symbol is define to disable any test surrounded with this.
add_compile_definitions(TEST_DISABLED)
add_executable (
${TARGET_NAME}
context.cpp

View File

@ -37,9 +37,9 @@ namespace Azure { namespace Core { namespace Test {
} // namespace
/*********************** Unique Tests for Libcurl ********************************/
// Disabling test with TEST_DISABLED. The test name cannot be changed because it depends on a
// friend class definition. Hence, it can't use the gtest DISABLE_
#if !defined(TEST_DISABLED)
// Disabling test with INCLUDE_DISABLED_TESTS. The test name cannot be changed because it depends
// on a friend class definition. Hence, it can't use the gtest DISABLE_.
#if defined(INCLUDE_DISABLED_TESTS)
TEST_P(TransportAdapter, connectionPoolTest)
{
Azure::Core::Http::Url host("http://httpbin.org/get");