mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Travis: Added Clang AddressSanitizer and UndefinedBehaviorSanitizer
This commit is contained in:
		| @@ -70,6 +70,12 @@ matrix: | ||||
|           sources: ['ubuntu-toolchain-r-test','llvm-toolchain-precise-3.8'] | ||||
|           packages: ['clang-3.8'] | ||||
|       env: SCRIPT=cmake CMAKE_CXX_COMPILER=clang++-3.8 | ||||
|     - compiler: clang | ||||
|       addons: | ||||
|         apt: | ||||
|           sources: ['ubuntu-toolchain-r-test','llvm-toolchain-precise-3.8'] | ||||
|           packages: ['clang-3.8'] | ||||
|       env: SCRIPT=sanitize CMAKE_CXX_COMPILER=clang++-3.8 | ||||
|     - compiler: gcc | ||||
|       env: SCRIPT=coverage | ||||
|     - os: osx | ||||
|   | ||||
| @@ -18,4 +18,8 @@ if(${COVERAGE}) | ||||
| 	set(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage") | ||||
| endif() | ||||
|  | ||||
| if(${SANITIZE}) | ||||
|    set(CMAKE_CXX_FLAGS "-fsanitize=address,undefined") | ||||
| endif() | ||||
|  | ||||
| add_subdirectory(test) | ||||
|   | ||||
							
								
								
									
										7
									
								
								scripts/travis/sanitize.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										7
									
								
								scripts/travis/sanitize.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| #!/bin/sh -eux | ||||
|  | ||||
| curl https://cmake.org/files/v3.4/cmake-3.4.0-Linux-x86_64.tar.gz | tar xz -C /tmp --strip 1 | ||||
|  | ||||
| /tmp/bin/cmake -DSANITIZE=true . | ||||
| make  | ||||
| make test | ||||
| @@ -12,7 +12,6 @@ file(GLOB TESTS_FILES *.hpp *.cpp) | ||||
| if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") | ||||
| 	add_compile_options( | ||||
| 		-fno-exceptions | ||||
| 		-fno-rtti | ||||
| 		-pedantic | ||||
| 		-Wall | ||||
| 		-Wcast-align | ||||
|   | ||||
		Reference in New Issue
	
	Block a user