Vagrantfile 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. # A virtual machine to run https://github.com/google/oss-fuzz
  2. Vagrant.configure(2) do |config|
  3. config.vm.box = "ubuntu/xenial64"
  4. config.vm.synced_folder "../..", "/host/ArduinoJson"
  5. config.vm.synced_folder "E:\\Git\\oss-fuzz", "/host/oss-fuzz"
  6. config.vm.network "forwarded_port", guest: 8001, host: 8001
  7. config.vm.provider "virtualbox" do |v|
  8. v.memory = 2048
  9. v.cpus = 2
  10. end
  11. config.vm.provision "shell", privileged: false, inline: <<-SHELL
  12. set -x
  13. sudo apt-get update
  14. sudo apt-get install -y make git docker.io zip
  15. sudo groupadd docker
  16. sudo usermod -aG docker $USER
  17. git clone https://github.com/google/fuzzer-test-suite.git FTS
  18. ./FTS/tutorial/install-deps.sh # Get deps
  19. ./FTS/tutorial/install-clang.sh # Get fresh clang binaries
  20. echo "export PROJECT_NAME='arduinojson'" >> $HOME/.profile
  21. echo "export CC='clang'" >> $HOME/.profile
  22. echo "export CXX='clang++'" >> $HOME/.profile
  23. echo "export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/" >> $HOME/.profile
  24. echo "Run /host/ArduinoJson/fuzzing/fuzz.sh" | sudo tee /etc/motd
  25. SHELL
  26. end