-
Notifications
You must be signed in to change notification settings - Fork 369
/
ci_test_transfers.sh
executable file
·21 lines (18 loc) · 923 Bytes
/
ci_test_transfers.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash
set -euo pipefail
# This test starts a standalone Geth node and runs transactions on it.
# For testing a particular branch of Geth repo (usually, on Circle CI)
# Usage: ci_test_transfers.sh checkout <branch_of_geth_repo_to_test>
# For testing the local Geth dir (usually, for manual testing)
# Usage: ci_test_transfers.sh local <location_of_local_geth_dir>
export TS_NODE_FILES=true
if [ "${1}" == "checkout" ]; then
# Test master by default.
BRANCH_TO_TEST=${2:-"master"}
echo "Checking out geth at branch ${BRANCH_TO_TEST}..."
./node_modules/.bin/mocha --node-option loader=ts-node/esm src/e2e-tests/transfer_tests.ts --branch ${BRANCH_TO_TEST}
elif [ "${1}" == "local" ]; then
export GETH_DIR="${2}"
echo "Testing using local geth dir ${GETH_DIR}..."
./node_modules/.bin/mocha --node-option loader=ts-node/esm src/e2e-tests/transfer_tests.ts --localgeth ${GETH_DIR}
fi