run_tests.sh

Read-only source from the unchanged 0.3.4 kit. Existing license terms apply.

#!/usr/bin/env sh
set -eu
cd "$(dirname "$0")"
PYTHONPATH=src python3 -m unittest discover -s tests -v
if command -v node >/dev/null 2>&1; then
  test_dir=$(mktemp -d)
  trap 'rm -rf "$test_dir"' EXIT HUP INT TERM
  packet_path="$test_dir/packet.json"
  node owner_app/test-console.cjs
  node owner_app/test-crypto.cjs "$packet_path"
  PYTHONPATH=src python3 -m ail_ref verify-packet "$packet_path"
fi