Skip to content

Commit

Permalink
Run individual Python tests via make.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Bushstar committed Apr 18, 2023
1 parent da17804 commit ebc2e07
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
18 changes: 18 additions & 0 deletions make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:-}
Expand Down
6 changes: 5 additions & 1 deletion test/functional/feature_evm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit ebc2e07

Please sign in to comment.