From ebc2e0754d1d04230674928b4391ec06be64ab82 Mon Sep 17 00:00:00 2001 From: Bushstar Date: Tue, 18 Apr 2023 09:02:17 +0100 Subject: [PATCH] Run individual Python tests via make.sh --- make.sh | 18 ++++++++++++++++++ test/functional/feature_evm.py | 6 +++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/make.sh b/make.sh index 9065161659f..2408e83e79d 100755 --- a/make.sh +++ b/make.sh @@ -336,6 +336,24 @@ test() { _exit_dir } +test_py() { + local release_target_dir=${RELEASE_TARGET_DIR} + local first_arg="${1:-}" + + if [[ -f "${first_arg}" ]]; then + shift + "${first_arg}" --configfile "${release_target_dir}/test/config.ini" --tmpdirprefix "./test_runner/" --ansi "$@" + return + fi + + _ensure_enter_dir "${release_target_dir}" + + # shellcheck disable=SC2086 + ./test/functional/test_runner.py --tmpdirprefix "./test_runner/" --ansi --combinedlogslen=10000 "$@" + + _exit_dir +} + exec() { local make_jobs=${MAKE_JOBS} local make_args=${MAKE_ARGS:-} diff --git a/test/functional/feature_evm.py b/test/functional/feature_evm.py index c878bc4b2af..cbee7fb1cb6 100755 --- a/test/functional/feature_evm.py +++ b/test/functional/feature_evm.py @@ -64,8 +64,12 @@ def run_test(self): assert_equal(newDFIbalance, DFIbalance) # assert_equal(newETHbalance, ETHbalance) + # Fund Eth address + self.nodes[0].transferbalance("evmin",{address:["10@DFI"]}, {ethAddress:["10@DFI"]}) + self.nodes[0].generate(1) + # Test EVM Tx - tx = self.nodes[0].evmtx(ethAddress, 0, 21, 21000, to_address, 0.1) + tx = self.nodes[0].evmtx(ethAddress, 0, 21, 21000, to_address, 1) assert_equal(self.nodes[0].getrawmempool(), [tx]) self.nodes[0].generate(1)