aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2019-01-16 11:00:23 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:21 +0800
commitea0c0a11ccbefffc2dbb5e323f23997b91239c56 (patch)
treedee84ebab0440d6202271d50d1c767cfe15daa72 /test
parentb78a7e2cdfb2240a5401d430c165ca3be100e03c (diff)
downloadgo-tangerine-ea0c0a11ccbefffc2dbb5e323f23997b91239c56.tar
go-tangerine-ea0c0a11ccbefffc2dbb5e323f23997b91239c56.tar.gz
go-tangerine-ea0c0a11ccbefffc2dbb5e323f23997b91239c56.tar.bz2
go-tangerine-ea0c0a11ccbefffc2dbb5e323f23997b91239c56.tar.lz
go-tangerine-ea0c0a11ccbefffc2dbb5e323f23997b91239c56.tar.xz
go-tangerine-ea0c0a11ccbefffc2dbb5e323f23997b91239c56.tar.zst
go-tangerine-ea0c0a11ccbefffc2dbb5e323f23997b91239c56.zip
test: update dmoment with python script (#153)
Diffstat (limited to 'test')
-rwxr-xr-xtest/run_test.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/run_test.sh b/test/run_test.sh
index a42e27142..5455dee2b 100755
--- a/test/run_test.sh
+++ b/test/run_test.sh
@@ -21,8 +21,17 @@ fi
rm -f log-latest
ln -s $logsdir log-latest
-let dmoment=`date +%s`+7
-sed -i "s/\"dMoment\": [0-9]\+,/\"dMoment\": $dmoment,/g" $GENESIS
+python << __FILE__
+import re
+import time
+
+with open('$GENESIS', 'r') as f:
+ data = f.read()
+
+with open('$GENESIS', 'w') as f:
+ dMoment = int(time.time()) + 7
+ f.write(re.sub('"dMoment": [0-9]+,', '"dMoment": %d,' % dMoment, data))
+__FILE__
# A standalone RPC server for accepting RPC requests.
datadir=$PWD/Dexon.rpc