mirror of
				https://github.com/bblanchon/ArduinoJson.git
				synced 2025-11-04 00:21:36 +01:00 
			
		
		
		
	
		
			
	
	
		
			31 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
		
		
			
		
	
	
			31 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| 
								 | 
							
								# A virtual machine to run https://github.com/google/oss-fuzz
							 | 
						||
| 
								 | 
							
								Vagrant.configure(2) do |config|
							 | 
						||
| 
								 | 
							
								  config.vm.box = "ubuntu/xenial64"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  config.vm.synced_folder "E:\\Git\\Arduino\\libraries\\ArduinoJson", "/host/ArduinoJson"
							 | 
						||
| 
								 | 
							
								  config.vm.synced_folder "E:\\Git\\oss-fuzz", "/host/oss-fuzz"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  config.vm.network "forwarded_port", guest: 8001, host: 8001
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  config.vm.provision "shell", privileged: false, inline: <<-SHELL
							 | 
						||
| 
								 | 
							
								    set -x
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    sudo apt-get update
							 | 
						||
| 
								 | 
							
								    sudo apt-get install -y make git docker.io zip
							 | 
						||
| 
								 | 
							
								    sudo groupadd docker
							 | 
						||
| 
								 | 
							
								    sudo usermod -aG docker $USER
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    git clone https://github.com/google/fuzzer-test-suite.git FTS
							 | 
						||
| 
								 | 
							
								    ./FTS/tutorial/install-deps.sh  # Get deps
							 | 
						||
| 
								 | 
							
								    ./FTS/tutorial/install-clang.sh # Get fresh clang binaries
							 | 
						||
| 
								 | 
							
								    # Get libFuzzer sources and build it
							 | 
						||
| 
								 | 
							
								    svn co http://llvm.org/svn/llvm-project/llvm/trunk/lib/Fuzzer
							 | 
						||
| 
								 | 
							
								    Fuzzer/build.sh
							 | 
						||
| 
								 | 
							
								    sudo mv libFuzzer.a /usr/local/lib/
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    echo "export PROJECT_NAME='arduinojson'" >> $HOME/.profile
							 | 
						||
| 
								 | 
							
								    echo "export CC='clang'" >> $HOME/.profile
							 | 
						||
| 
								 | 
							
								    echo "export CXX='clang++'" >> $HOME/.profile
							 | 
						||
| 
								 | 
							
								  SHELL
							 | 
						||
| 
								 | 
							
								end
							 |