functional_tests: move RPC API to utils, it is not test specific

This commit is contained in:
moneromooo-monero 2019-03-22 14:35:23 +00:00
parent 30c865f0f8
commit 22b644f47e
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
17 changed files with 25 additions and 19 deletions

View File

@ -41,7 +41,7 @@ Test the following RPCs:
""" """
from test_framework.daemon import Daemon from framework.daemon import Daemon
class BlockchainTest(): class BlockchainTest():
def run_test(self): def run_test(self):

View File

@ -33,8 +33,8 @@ import time
"""Test cold tx signing """Test cold tx signing
""" """
from test_framework.daemon import Daemon from framework.daemon import Daemon
from test_framework.wallet import Wallet from framework.wallet import Wallet
class ColdSigningTest(): class ColdSigningTest():
def run_test(self): def run_test(self):

View File

@ -36,7 +36,7 @@ Test the following RPCs:
""" """
from test_framework.daemon import Daemon from framework.daemon import Daemon
class DaemonGetInfoTest(): class DaemonGetInfoTest():
def run_test(self): def run_test(self):

View File

@ -7,6 +7,7 @@ import subprocess
from signal import SIGTERM from signal import SIGTERM
import socket import socket
import string import string
import os
USAGE = 'usage: functional_tests_rpc.py <python> <srcdir> <builddir> [<tests-to-run> | all]' USAGE = 'usage: functional_tests_rpc.py <python> <srcdir> <builddir> [<tests-to-run> | all]'
DEFAULT_TESTS = ['daemon_info', 'blockchain', 'wallet_address', 'integrated_address', 'mining', 'transfer', 'txpool', 'multisig', 'cold_signing', 'sign_message', 'proofs'] DEFAULT_TESTS = ['daemon_info', 'blockchain', 'wallet_address', 'integrated_address', 'mining', 'transfer', 'txpool', 'multisig', 'cold_signing', 'sign_message', 'proofs']
@ -56,6 +57,11 @@ for i in range(N_WALLETS):
print('Starting servers...') print('Starting servers...')
try: try:
PYTHONPATH = os.environ['PYTHONPATH'] if 'PYTHONPATH' in os.environ else ''
if len(PYTHONPATH) > 0:
PYTHONPATH += ':'
PYTHONPATH += '../../utils/python-rpc'
os.environ['PYTHONPATH'] = PYTHONPATH
for i in range(len(command_lines)): for i in range(len(command_lines)):
#print('Running: ' + str(command_lines[i])) #print('Running: ' + str(command_lines[i]))
processes.append(subprocess.Popen(command_lines[i], stdout = outputs[i])) processes.append(subprocess.Popen(command_lines[i], stdout = outputs[i]))

View File

@ -38,7 +38,7 @@ Test the following RPCs:
""" """
from test_framework.wallet import Wallet from framework.wallet import Wallet
class IntegratedAddressTest(): class IntegratedAddressTest():
def run_test(self): def run_test(self):

View File

@ -38,8 +38,8 @@ Test the following RPCs:
- mining_status - mining_status
""" """
from test_framework.daemon import Daemon from framework.daemon import Daemon
from test_framework.wallet import Wallet from framework.wallet import Wallet
class MiningTest(): class MiningTest():
def run_test(self): def run_test(self):

View File

@ -33,8 +33,8 @@ import time
"""Test multisig transfers """Test multisig transfers
""" """
from test_framework.daemon import Daemon from framework.daemon import Daemon
from test_framework.wallet import Wallet from framework.wallet import Wallet
class MultisigTest(): class MultisigTest():
def run_test(self): def run_test(self):

View File

@ -33,8 +33,8 @@ import time
"""Test misc proofs (tx key, send, receive, reserve) """Test misc proofs (tx key, send, receive, reserve)
""" """
from test_framework.daemon import Daemon from framework.daemon import Daemon
from test_framework.wallet import Wallet from framework.wallet import Wallet
class ProofsTest(): class ProofsTest():
def run_test(self): def run_test(self):

View File

@ -38,7 +38,7 @@ Test the following RPCs:
""" """
from test_framework.wallet import Wallet from framework.wallet import Wallet
class MessageSigningTest(): class MessageSigningTest():
def run_test(self): def run_test(self):

View File

@ -42,8 +42,8 @@ import time
from time import sleep from time import sleep
from decimal import Decimal from decimal import Decimal
from test_framework.daemon import Daemon from framework.daemon import Daemon
from test_framework.wallet import Wallet from framework.wallet import Wallet
class SpeedTest(): class SpeedTest():

View File

@ -33,8 +33,8 @@ import time
"""Test simple transfers """Test simple transfers
""" """
from test_framework.daemon import Daemon from framework.daemon import Daemon
from test_framework.wallet import Wallet from framework.wallet import Wallet
class TransferTest(): class TransferTest():
def run_test(self): def run_test(self):

View File

@ -33,8 +33,8 @@ import time
"""Test txpool """Test txpool
""" """
from test_framework.daemon import Daemon from framework.daemon import Daemon
from test_framework.wallet import Wallet from framework.wallet import Wallet
class TransferTest(): class TransferTest():
def run_test(self): def run_test(self):

View File

@ -37,7 +37,7 @@ Test the following RPCs:
""" """
from test_framework.wallet import Wallet from framework.wallet import Wallet
class WalletAddressTest(): class WalletAddressTest():
def run_test(self): def run_test(self):