選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

rpc-tests.sh 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #!/bin/bash
  2. set -e
  3. CURDIR=$(cd $(dirname "$0"); pwd)
  4. # Get BUILDDIR and REAL_BITCOIND
  5. . "${CURDIR}/tests-config.sh"
  6. export BITCOIND=${REAL_BITCOIND}
  7. export BITCOINCLI=${REAL_BITCOINCLI}
  8. if [ "x${EXEEXT}" = "x.exe" ]; then
  9. echo "Win tests currently disabled"
  10. exit 0
  11. fi
  12. #Run the tests
  13. testScripts=(
  14. 'wallet.py'
  15. 'listtransactions.py'
  16. 'mempool_resurrect_test.py'
  17. 'txn_doublespend.py --mineblock'
  18. 'txn_clone.py'
  19. 'getchaintips.py'
  20. 'rawtransactions.py'
  21. 'rest.py'
  22. 'mempool_spendcoinbase.py'
  23. 'mempool_coinbase_spends.py'
  24. 'httpbasics.py'
  25. 'zapwallettxes.py'
  26. 'proxy_test.py'
  27. 'merkle_blocks.py'
  28. 'fundrawtransaction.py'
  29. 'signrawtransactions.py'
  30. 'walletbackup.py'
  31. 'nodehandling.py'
  32. 'reindex.py'
  33. 'decodescript.py'
  34. 'p2p-fullblocktest.py'
  35. );
  36. testScriptsExt=(
  37. 'bipdersig-p2p.py'
  38. 'bipdersig.py'
  39. 'getblocktemplate_longpoll.py'
  40. 'getblocktemplate_proposals.py'
  41. 'txn_doublespend.py'
  42. 'txn_clone.py --mineblock'
  43. 'pruning.py'
  44. 'forknotify.py'
  45. 'invalidateblock.py'
  46. 'keypool.py'
  47. 'receivedby.py'
  48. 'rpcbind_test.py'
  49. # 'script_test.py'
  50. 'smartfees.py'
  51. 'maxblocksinflight.py'
  52. 'invalidblockrequest.py'
  53. # 'forknotify.py'
  54. 'p2p-acceptblock.py'
  55. 'mempool_packages.py'
  56. );
  57. #if [ "x$ENABLE_ZMQ" = "x1" ]; then
  58. # testScripts+=('zmq_test.py')
  59. #fi
  60. extArg="-extended"
  61. passOn=${@#$extArg}
  62. if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
  63. for (( i = 0; i < ${#testScripts[@]}; i++ ))
  64. do
  65. if [ -z "$1" ] || [ "${1:0:1}" == "-" ] || [ "$1" == "${testScripts[$i]}" ] || [ "$1.py" == "${testScripts[$i]}" ]
  66. then
  67. echo -e "Running testscript \033[1m${testScripts[$i]}...\033[0m"
  68. ${BUILDDIR}/qa/rpc-tests/${testScripts[$i]} --srcdir "${BUILDDIR}/src" ${passOn}
  69. fi
  70. done
  71. for (( i = 0; i < ${#testScriptsExt[@]}; i++ ))
  72. do
  73. if [ "$1" == $extArg ] || [ "$1" == "${testScriptsExt[$i]}" ] || [ "$1.py" == "${testScriptsExt[$i]}" ]
  74. then
  75. echo -e "Running \033[1m2nd level\033[0m testscript \033[1m${testScriptsExt[$i]}...\033[0m"
  76. ${BUILDDIR}/qa/rpc-tests/${testScriptsExt[$i]} --srcdir "${BUILDDIR}/src" ${passOn}
  77. fi
  78. done
  79. else
  80. echo "No rpc tests to run. Wallet, utils, and bitcoind must all be enabled"
  81. fi