test.sh 300 B

12345678910111213
  1. #! /bin/bash
  2. output=$(nc -z localhost 8545; echo $?)
  3. [ $output -eq "0" ] && trpc_running=true
  4. if [ ! $trpc_running ]; then
  5. echo "Starting our own testrpc node instance"
  6. testrpc > /dev/null &
  7. trpc_pid=$!
  8. fi
  9. ./node_modules/truffle/cli.js test
  10. if [ ! $trpc_running ]; then
  11. kill -9 $trpc_pid
  12. fi