Skip to content

Commit 3e875b1

Browse files
committed
pull-tester/rpc-tests.sh: allow passing throug of arguments
1 parent 00706a5 commit 3e875b1

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

qa/pull-tester/rpc-tests.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ testScriptsExt=(
3737
'bipdersig.py'
3838
'getblocktemplate_longpoll.py'
3939
'getblocktemplate_proposals.py'
40-
'prune.py'
40+
'pruning.py'
4141
'forknotify.py'
4242
'invalidateblock.py'
4343
'keypool.py'
@@ -51,21 +51,25 @@ testScriptsExt=(
5151
'rawtransactions.py'
5252
# 'forknotify.py'
5353
);
54+
55+
extArg="-extended"
56+
passOn=${@#$extArg}
57+
5458
if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
5559
for (( i = 0; i < ${#testScripts[@]}; i++ ))
5660
do
57-
if [ -z "$1" ] || [ "$1" == "-extended" ] || [ "$1" == "${testScripts[$i]}" ] || [ "$1.py" == "${testScripts[$i]}" ]
61+
if [ -z "$1" ] || [ "${1:0:1}" == "-" ] || [ "$1" == "${testScripts[$i]}" ] || [ "$1.py" == "${testScripts[$i]}" ]
5862
then
5963
echo -e "Running testscript \033[1m${testScripts[$i]}...\033[0m"
60-
${BUILDDIR}/qa/rpc-tests/${testScripts[$i]} --srcdir "${BUILDDIR}/src"
64+
${BUILDDIR}/qa/rpc-tests/${testScripts[$i]} --srcdir "${BUILDDIR}/src" ${passOn}
6165
fi
6266
done
6367
for (( i = 0; i < ${#testScriptsExt[@]}; i++ ))
6468
do
65-
if [ "$1" == "-extended" ] || [ "$1" == "${testScriptsExt[$i]}" ] || [ "$1.py" == "${testScriptsExt[$i]}" ]
69+
if [ "$1" == $extArg ] || [ "$1" == "${testScriptsExt[$i]}" ] || [ "$1.py" == "${testScriptsExt[$i]}" ]
6670
then
67-
echo -e "Running testscript \033[1m${testScriptsExt[$i]}...\033[0m"
68-
${BUILDDIR}/qa/rpc-tests/${testScriptsExt[$i]} --srcdir "${BUILDDIR}/src"
71+
echo -e "Running \033[1m2nd level\033[0m testscript \033[1m${testScriptsExt[$i]}...\033[0m"
72+
${BUILDDIR}/qa/rpc-tests/${testScriptsExt[$i]} --srcdir "${BUILDDIR}/src" ${passOn}
6973
fi
7074
done
7175
else

qa/rpc-tests/rawtransactions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
# that spend (directly or indirectly) coinbase transactions.
99
#
1010

11-
from test_framework import BitcoinTestFramework
12-
from util import *
11+
from test_framework.test_framework import BitcoinTestFramework
12+
from test_framework.util import *
1313
from pprint import pprint
1414
from time import sleep
1515

qa/rpc-tests/signrawtransactions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

6-
from test_framework import BitcoinTestFramework
7-
from util import *
6+
from test_framework.test_framework import BitcoinTestFramework
7+
from test_framework.util import *
88

99

1010
class SignRawTransactionsTest(BitcoinTestFramework):

0 commit comments

Comments
 (0)