Skip to content

Commit 6c6502c

Browse files
committed
Suppress erroneous errors on OS X and Unix
1 parent 9a0d6e7 commit 6c6502c

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ IF (test)
103103
if(UNIX)
104104
# setup valgrind
105105
ADD_CUSTOM_TARGET(memcheck
106-
valgrind --leak-check=full --dsymutil=yes --error-exitcode=1 ./test/runTests >/dev/null
106+
valgrind --leak-check=full --suppressions=./test/valgrind.supp --dsymutil=yes --error-exitcode=1 ./test/runTests >/dev/null
107107
)
108108
endif()
109109

test/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ ENABLE_TESTING()
44

55
INCLUDE_DIRECTORIES(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})
66

7+
FILE(COPY valgrind.supp DESTINATION .)
8+
79
ADD_EXECUTABLE(runTests ParserTests.cpp)
810

911
TARGET_LINK_LIBRARIES(runTests gtest gtest_main)

test/valgrind.supp

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
<osx_strdup_query_string>
3+
Memcheck:Cond
4+
fun:strlen
5+
fun:strdup
6+
fun:_ZN2yy17GraphQLParserImpl5parseEv
7+
fun:_ZN8facebook7graphqlL7doParseEPPKcPv
8+
fun:_ZN8facebook7graphql11parseStringEPKcPS2_
9+
fun:_ZL11expectErrorPKcS0_
10+
fun:_ZN44ParserTests_TracksLocationAcrossStrings_Test8TestBodyEv
11+
fun:_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc
12+
fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc
13+
fun:_ZN7testing4Test3RunEv
14+
fun:_ZN7testing8TestInfo3RunEv
15+
fun:_ZN7testing8TestCase3RunEv
16+
}
17+
18+
{
19+
<unix_strdup_query_string>
20+
Memcheck:Cond
21+
fun:__GI_strlen
22+
fun:strdup
23+
fun:_ZN2yy17GraphQLParserImpl5parseEv
24+
fun:_ZN8facebook7graphqlL7doParseEPPKcPv
25+
fun:_ZN8facebook7graphql11parseStringEPKcPS2_
26+
fun:_ZL11expectErrorPKcS0_
27+
fun:_ZN44ParserTests_TracksLocationAcrossStrings_Test8TestBodyEv
28+
fun:_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc
29+
fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc
30+
fun:_ZN7testing4Test3RunEv
31+
fun:_ZN7testing8TestInfo3RunEv
32+
fun:_ZN7testing8TestCase3RunEv
33+
}

0 commit comments

Comments
 (0)