run-ptest 609 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. echo "############ Running Wolfssl Ptest ##########"
  3. log_file=ptest.log
  4. temp_dir=$(mktemp -d /tmp/wolfss_temp.XXXXXX)
  5. echo "Wolfssl ptest logs are stored in ${temp_dir}/${log_file}"
  6. ./test/unit.test > "$temp_dir/$log_file" 2>&1
  7. ret=$?
  8. echo "Test script returned: $ret"
  9. MAGIC_SENTENCE=$(grep "unit_test: Success for all configured tests." $temp_dir/$log_file)
  10. if [ -n "$MAGIC_SENTENCE" ]; then
  11. echo "$MAGIC_SENTENCE"
  12. echo "PASS: Wolfssl"
  13. else
  14. echo "#### Issue with at least one test !####"
  15. echo "FAIL: Wolfssl"
  16. fi
  17. NUM_FAILS=$(grep -c "Failed" $temp_dir/$log_file)
  18. exit $ret