File tree Expand file tree Collapse file tree 5 files changed +51
-1
lines changed Expand file tree Collapse file tree 5 files changed +51
-1
lines changed Original file line number Diff line number Diff line change @@ -17,3 +17,4 @@ cmake_install.cmake
17
17
* .so
18
18
GraphQLParser.py
19
19
install_manifest.txt
20
+ build /
Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ compiler:
4
4
- clang
5
5
- gcc
6
6
7
+
8
+ addons :
9
+ apt :
10
+ packages :
11
+ - valgrind
12
+
7
13
before_install :
8
14
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
9
15
- sudo apt-get update -qq
@@ -19,4 +25,4 @@ before_install:
19
25
&& cd ..
20
26
&& rm gtest-1.7.0.zip
21
27
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
99
99
100
100
IF (test )
101
101
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
+
102
110
ENDIF ()
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ ENABLE_TESTING()
4
4
5
5
INCLUDE_DIRECTORIES (${gtest_SOURCE_DIR} /include ${gtest_SOURCE_DIR} )
6
6
7
+ FILE (COPY valgrind.supp DESTINATION . )
8
+
7
9
ADD_EXECUTABLE (runTests ParserTests.cpp )
8
10
9
11
TARGET_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