You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
885 B

  1. #!/bin/bash
  2. # returns non-zero error code if any proof fails
  3. success=0
  4. log_dir=$(cat /dev/urandom | tr -cd 'a-f0-9' | head -c 6)
  5. cmd="ivy_check seed=$RANDOM"
  6. mkdir -p output/$log_dir
  7. echo "Checking classic safety:"
  8. res=$($cmd classic_safety.ivy | tee "output/$log_dir/classic_safety.txt" | tail -n 1)
  9. if [ "$res" = "OK" ]; then
  10. echo "OK"
  11. else
  12. echo "FAILED"
  13. success=1
  14. fi
  15. echo "Checking accountable safety 1:"
  16. res=$($cmd accountable_safety_1.ivy | tee "output/$log_dir/accountable_safety_1.txt" | tail -n 1)
  17. if [ "$res" = "OK" ]; then
  18. echo "OK"
  19. else
  20. echo "FAILED"
  21. success=1
  22. fi
  23. echo "Checking accountable safety 2:"
  24. res=$($cmd complete=fo accountable_safety_2.ivy | tee "output/$log_dir/accountable_safety_2.txt" | tail -n 1)
  25. if [ "$res" = "OK" ]; then
  26. echo "OK"
  27. else
  28. echo "FAILED"
  29. success=1
  30. fi
  31. echo
  32. echo "See ivy_check output in the output/ folder"
  33. exit $success