github.com/vipernet-xyz/tm@v0.34.24/spec/ivy-proofs/check_proofs.sh (about)

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