File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,3 +17,4 @@ cmake_install.cmake
1717* .so
1818GraphQLParser.py
1919install_manifest.txt
20+ build /
Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ compiler:
44 - clang
55 - gcc
66
7+
8+ addons :
9+ apt :
10+ packages :
11+ - valgrind
12+
713before_install :
814 - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
915 - sudo apt-get update -qq
@@ -19,4 +25,4 @@ before_install:
1925 && cd ..
2026 && rm gtest-1.7.0.zip
2127
22- script : mkdir build && cd build && cmake .. -Dtest=ON && make && test/runTests
28+ script : mkdir build && cd build && cmake .. -Dtest=ON && make && test/runTests && make memcheck
Original file line number Diff line number Diff line change @@ -99,4 +99,12 @@ INSTALL(TARGETS graphqlparser
9999
100100IF (test )
101101 ADD_SUBDIRECTORY (test )
102+
103+ if (UNIX )
104+ # setup valgrind
105+ ADD_CUSTOM_TARGET (memcheck
106+ valgrind --leak-check=full --suppressions=./test/valgrind.supp --dsymutil=yes --error-exitcode=1 ./test/runTests >/dev/null
107+ )
108+ endif ()
109+
102110ENDIF ()
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ ENABLE_TESTING()
44
55INCLUDE_DIRECTORIES (${gtest_SOURCE_DIR} /include ${gtest_SOURCE_DIR} )
66
7+ FILE (COPY valgrind.supp DESTINATION . )
8+
79ADD_EXECUTABLE (runTests ParserTests.cpp )
810
911TARGET_LINK_LIBRARIES (runTests gtest gtest_main )
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments