Skip to content

Commit 646ca61

Browse files
Test without ASan
1 parent 107c501 commit 646ca61

2 files changed

Lines changed: 19 additions & 18 deletions

File tree

test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CXX = clang++
2-
CXXFLAGS = -g -std=c++11 -I. -Wall -Wextra -Wtype-limits -Wconversion -Wshadow -fsanitize=address $(EXTRA_CXXFLAGS) # -fno-exceptions -DCPPHTTPLIB_NO_EXCEPTIONS
2+
CXXFLAGS = -g -std=c++11 -I. -Wall -Wextra -Wtype-limits -Wconversion -Wshadow $(EXTRA_CXXFLAGS) # -fno-exceptions -DCPPHTTPLIB_NO_EXCEPTIONS -fsanitize=address
33

44
PREFIX ?= $(shell brew --prefix)
55

test/test.cc

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8471,21 +8471,21 @@ TEST(ClientInThreadTest, Issue2068) {
84718471
}
84728472
}
84738473

8474-
#if defined(__SANITIZE_ADDRESS__)
8475-
#define ASAN_ENABLED 1
8476-
#else
8477-
#if defined(__has_feature)
8478-
#if __has_feature(address_sanitizer)
8479-
#define ASAN_ENABLED 1
8480-
#else
8481-
#define ASAN_ENABLED 0
8482-
#endif
8483-
#else
8484-
#define ASAN_ENABLED 0
8485-
#endif
8486-
#endif
8487-
8488-
#if ASAN_ENABLED
8474+
// #if defined(__SANITIZE_ADDRESS__)
8475+
// #define ASAN_ENABLED 1
8476+
// #else
8477+
// #if defined(__has_feature)
8478+
// #if __has_feature(address_sanitizer)
8479+
// #define ASAN_ENABLED 1
8480+
// #else
8481+
// #define ASAN_ENABLED 0
8482+
// #endif
8483+
// #else
8484+
// #define ASAN_ENABLED 0
8485+
// #endif
8486+
// #endif
8487+
8488+
// #if ASAN_ENABLED
84898489
Server *issue2097_svr = nullptr;
84908490
std::thread *issue2097_svr_thread = nullptr;
84918491

@@ -8526,8 +8526,9 @@ TEST(ExitTimeDtorsTest, Issue2097) {
85268526
#ifdef CPPHTTPLIB_NO_EXIT_TIME_DESTRUCTORS
85278527
::testing::ExitedWithCode(42),
85288528
#else
8529-
::testing::ExitedWithCode(1),
8529+
::testing::KilledBySignal(SIGSEGV),
85308530
#endif
85318531
"");
85328532
}
8533-
#endif
8533+
// #endif
8534+
//return WIFEXITED(exit_status) && WEXITSTATUS(exit_status) == exit_code_;

0 commit comments

Comments
 (0)