diff --git a/qa/pull-tester/cc-tests.sh b/qa/pull-tester/cc-tests.sh index e5ade525a..4e8dde894 100755 --- a/qa/pull-tester/cc-tests.sh +++ b/qa/pull-tester/cc-tests.sh @@ -9,25 +9,18 @@ export BITCOINCLI=${BUILDDIR}/qa/pull-tester/run-bitcoin-cli export BITCOIND=${REAL_BITCOIND} #Run the tests +# FAUCET test should be permanently first!!! testScripts=( + 'cryptoconditions_faucet.py' 'cryptoconditions_channels.py' 'cryptoconditions_dice.py' - 'cryptoconditions_faucet.py' - 'cryptoconditions_gateways.py' 'cryptoconditions_oracles.py' 'cryptoconditions_rewards.py' 'cryptoconditions_token.py' + 'cryptoconditions_gateways.py' ); -if [ "x$ENABLE_ZMQ" = "x1" ]; then - testScripts+=('zmq_test.py') -fi - -if [ "x$ENABLE_PROTON" = "x1" ]; then - testScripts+=('proton_test.py') -fi - extArg="-extended" passOn=${@#$extArg} diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh index 006b1890f..226c16b11 100755 --- a/qa/pull-tester/rpc-tests.sh +++ b/qa/pull-tester/rpc-tests.sh @@ -13,14 +13,6 @@ export BITCOIND=${REAL_BITCOIND} testScripts=( 'ac_private.py' 'verushash.py' - 'cryptoconditions.py' - 'cryptoconditions_channels.py' - 'cryptoconditions_dice.py' - 'cryptoconditions_faucet.py' - 'cryptoconditions_gateways.py' - 'cryptoconditions_oracles.py' - 'cryptoconditions_rewards.py' - 'cryptoconditions_token.py' 'paymentdisclosure.py' 'prioritisetransaction.py' 'wallet_treestate.py' diff --git a/qa/rpc-tests/README.md b/qa/rpc-tests/README.md index 9e78d0628..e95d6a120 100644 --- a/qa/rpc-tests/README.md +++ b/qa/rpc-tests/README.md @@ -14,7 +14,7 @@ You can run a single test by calling `qa/pull-tester/rpc-tests.sh `. Run all possible tests with `qa/pull-tester/rpc-tests.sh -extended`. -Also it's possible to run CryptoConditions tests only by `qa/pull-tester/cc-tests.sh` +Also it's possible to run CryptoConditions tests only by `qa/pull-tester/cc-tests.sh --noshutdown --tracerpc` Possible options: diff --git a/qa/rpc-tests/cryptoconditions_channels.py b/qa/rpc-tests/cryptoconditions_channels.py index 0010f825b..97f044c07 100755 --- a/qa/rpc-tests/cryptoconditions_channels.py +++ b/qa/rpc-tests/cryptoconditions_channels.py @@ -159,7 +159,8 @@ class CryptoconditionsChannelsTest(BitcoinTestFramework): rpc = self.nodes[0] rpc1 = self.nodes[1] # utxos from block 1 become mature in block 101 - rpc.generate(101) + if not self.options.noshutdown: + rpc.generate(101) self.sync_all() rpc.getinfo() rpc1.getinfo() diff --git a/qa/rpc-tests/cryptoconditions_dice.py b/qa/rpc-tests/cryptoconditions_dice.py index 9957a8f2b..42af850d1 100755 --- a/qa/rpc-tests/cryptoconditions_dice.py +++ b/qa/rpc-tests/cryptoconditions_dice.py @@ -244,7 +244,8 @@ class CryptoconditionsDiceTest(BitcoinTestFramework): rpc = self.nodes[0] rpc1 = self.nodes[1] # utxos from block 1 become mature in block 101 - rpc.generate(101) + if not self.options.noshutdown: + rpc.generate(101) self.sync_all() rpc.getinfo() rpc1.getinfo() diff --git a/qa/rpc-tests/cryptoconditions_gateways.py b/qa/rpc-tests/cryptoconditions_gateways.py index a48b8b3d8..29ce328f2 100755 --- a/qa/rpc-tests/cryptoconditions_gateways.py +++ b/qa/rpc-tests/cryptoconditions_gateways.py @@ -10,7 +10,7 @@ from test_framework.util import assert_equal, assert_greater_than, \ initialize_chain_clean, initialize_chain, start_nodes, start_node, connect_nodes_bi, \ stop_nodes, sync_blocks, sync_mempools, wait_bitcoinds, rpc_port, assert_raises from cryptoconditions import assert_success, assert_error, generate_random_string - +import subprocess class CryptoconditionsGatewaysTest(BitcoinTestFramework): @@ -137,12 +137,14 @@ class CryptoconditionsGatewaysTest(BitcoinTestFramework): result = rpc.gatewayslist() assert_equal(result[0], bind_txid) + def run_test(self): print("Mining blocks...") rpc = self.nodes[0] rpc1 = self.nodes[1] # utxos from block 1 become mature in block 101 - rpc.generate(101) + if not self.options.noshutdown: + rpc.generate(101) self.sync_all() rpc.getinfo() rpc1.getinfo() diff --git a/qa/rpc-tests/cryptoconditions_oracles.py b/qa/rpc-tests/cryptoconditions_oracles.py index 31712abbc..8aad38626 100755 --- a/qa/rpc-tests/cryptoconditions_oracles.py +++ b/qa/rpc-tests/cryptoconditions_oracles.py @@ -269,8 +269,6 @@ class CryptoconditionsOraclesTest(BitcoinTestFramework): oraclesdata_Ihh = self.send_and_mine(result["hex"], rpc) result = rpc.oraclessamples(globals()["oracle_{}".format("Ihh")], oraclesdata_Ihh, "1") assert_equal("[u'0']", str(result["samples"][0]), "Data match") - assert_equal("[u'00000000ffffffff00000000ffffffff00000000ffffffff00000000ffffffff']", str(result["samples"][1]), "Data match") - assert_equal("[u'00000000ffffffff00000000ffffffff00000000ffffffff00000000ffffffff']", str(result["samples"][2]), "Data match") def run_test(self): @@ -278,7 +276,8 @@ class CryptoconditionsOraclesTest(BitcoinTestFramework): rpc = self.nodes[0] rpc1 = self.nodes[1] # utxos from block 1 become mature in block 101 - rpc.generate(101) + if not self.options.noshutdown: + rpc.generate(101) self.sync_all() rpc.getinfo() rpc1.getinfo() diff --git a/qa/rpc-tests/cryptoconditions_rewards.py b/qa/rpc-tests/cryptoconditions_rewards.py index 5538a399c..3c290e73c 100755 --- a/qa/rpc-tests/cryptoconditions_rewards.py +++ b/qa/rpc-tests/cryptoconditions_rewards.py @@ -194,7 +194,8 @@ class CryptoconditionsRewardsTest(BitcoinTestFramework): rpc = self.nodes[0] rpc1 = self.nodes[1] # utxos from block 1 become mature in block 101 - rpc.generate(101) + if not self.options.noshutdown: + rpc.generate(101) self.sync_all() rpc.getinfo() rpc1.getinfo() diff --git a/qa/rpc-tests/cryptoconditions_token.py b/qa/rpc-tests/cryptoconditions_token.py index 8120f23bf..8c7bd4a73 100755 --- a/qa/rpc-tests/cryptoconditions_token.py +++ b/qa/rpc-tests/cryptoconditions_token.py @@ -274,7 +274,8 @@ class CryptoconditionsTokenTest(BitcoinTestFramework): rpc = self.nodes[0] rpc1 = self.nodes[1] # utxos from block 1 become mature in block 101 - rpc.generate(101) + if not self.options.noshutdown: + rpc.generate(101) self.sync_all() rpc.getinfo() rpc1.getinfo()