Makefile 557 B

12345678910111213141516171819202122232425262728293031
  1. build:
  2. @echo ===BUILDING===
  3. docker build -t ebpftracer .
  4. docker cp $(shell docker create --rm ebpftracer):/tmp/ebpf.go ./ebpf.go
  5. @echo
  6. test: test_vm1 test_vm2 test_vm3
  7. define test_in_vm
  8. @echo ===TESTING IN $(1)===
  9. vagrant ssh $(1) -c "uname -r && cd /tmp/src && sudo go test -p 1 -count 1 -v ./ebpftracer/..."
  10. @echo
  11. endef
  12. test_vm1: build
  13. $(call test_in_vm,ubuntu1810)
  14. test_vm2: build
  15. $(call test_in_vm,ubuntu2004)
  16. test_vm3: build
  17. $(call test_in_vm,ubuntu2010)
  18. vms_start:
  19. vagrant up
  20. vms_stop:
  21. vagrant suspend
  22. vms_delete:
  23. vagrant destroy