diff options
author | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-15 21:42:20 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-09-17 16:57:30 +0800 |
commit | 2683ddd4341799e166e9e46f7c7aee90b57443ff (patch) | |
tree | f6b66478e9019404385e66e08085aca662ebc106 /test/run_test.sh | |
parent | ac088de6322fc16ebe75c2e5554be73754bf1fe2 (diff) | |
download | go-tangerine-2683ddd4341799e166e9e46f7c7aee90b57443ff.tar.gz go-tangerine-2683ddd4341799e166e9e46f7c7aee90b57443ff.tar.zst go-tangerine-2683ddd4341799e166e9e46f7c7aee90b57443ff.zip |
build: fix test scripts
Diffstat (limited to 'test/run_test.sh')
-rwxr-xr-x | test/run_test.sh | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/test/run_test.sh b/test/run_test.sh index 20c3357e0..181f8b755 100755 --- a/test/run_test.sh +++ b/test/run_test.sh @@ -1,4 +1,6 @@ -#!/bin/bash +#!/bin/sh + +cd "$(dirname "$0")" BOOTNODE_FLAGS="--bootnodes enode://b0dacdaceb9ce26f89406e8048d279d3aa81c770e967db7e2556e416ca446de0e9327dbdf85eb56c421eeabbc843ceb8f373e7a26dc31d48178620e48cb095c4@127.0.0.1:30301" GENESIS="genesis.json" @@ -45,16 +47,6 @@ rm -f log-latest ln -s $logsdir log-latest -# the recovery contract address 0x80859F3d0D781c2c4126962cab0c977b37820e78 is deployed using keystore/monkey.key -if $SMOKETEST; then - if [ `uname` == "Darwin" ]; then - sed -i '' 's/"contract":.*,/"contract": "0x80859F3d0D781c2c4126962cab0c977b37820e78",/g' genesis.json - else - sed -i 's/"contract":.*,/"contract": "0x80859F3d0D781c2c4126962cab0c977b37820e78",/g' genesis.json - fi -fi - - python << __FILE__ import re import time @@ -64,6 +56,12 @@ with open('$GENESIS', 'r') as f: with open('$GENESIS', 'w') as f: dMoment = int(time.time()) + 15 + data = re.sub('"dMoment": [0-9]+,', '"dMoment": %d,' % dMoment, data) + + if '$SMOKETEST' == 'true': + # Recovery contract address deployed using keystore/monkey.key + data = re.sub('"contract":.*,', '"contract": "0x2Fc9806dDad6044C8158bA31D08b7d9495474A89",', data) + f.write(re.sub('"dMoment": [0-9]+,', '"dMoment": %d,' % dMoment, data)) __FILE__ |