test.sh 644 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. # Write a keypair for program deploy
  3. mkdir -p target/deploy
  4. cp keypairs/idl_commands_one-keypair.json target/deploy
  5. echo "Building programs"
  6. anchor build
  7. echo "Starting local validator for test"
  8. solana-test-validator --reset \
  9. -q \
  10. --mint tgyXxAhCkpgtKCEi4W6xWJSzqwVGs3uk2RodbZP2J49 \
  11. --bpf-program 2uA3amp95zsEHUpo8qnLMhcFAUsiKVEcKHXS1JetFjU5 target/deploy/idl_commands_one.so \
  12. --bpf-program DE4UbHnAcT6Kfh1fVTPRPwpiA3vipmQ4xR3gcLwX3wwS target/deploy/idl_commands_one.so \
  13. &
  14. sleep 10
  15. echo "Running tests"
  16. anchor test --skip-deploy --skip-local-validator
  17. trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT