提交 feea5dba 编写于 作者: B Bill Hamilton

Merge branch 'release/1.1' into eosio_build_amazon

Merging release/1.1 into eosio_build_amazon
......@@ -319,6 +319,29 @@ class Cluster(object):
ret=Utils.waitForBool(lam, timeout)
return ret
@staticmethod
def getClientVersion(verbose=False):
"""Returns client version (string)"""
p = re.compile('^Build version:\s(\w+)\n$')
try:
cmd="%s version client" % (Utils.EosClientPath)
if verbose: Utils.Print("cmd: %s" % (cmd))
response=Utils.checkOutput(cmd.split())
assert(response)
assert(isinstance(response, str))
if verbose: Utils.Print("response: <%s>" % (response))
m=p.match(response)
if m is None:
Utils.Print("ERROR: client version regex mismatch")
return None
verStr=m.group(1)
return verStr
except subprocess.CalledProcessError as ex:
msg=ex.output.decode("utf-8")
Utils.Print("ERROR: Exception during client version query. %s" % (msg))
raise
@staticmethod
def createAccountKeys(count):
accounts=[]
......
from testUtils import Utils
from Cluster import Cluster
from WalletMgr import WalletMgr
from datetime import datetime
import platform
import argparse
......@@ -83,6 +85,17 @@ class TestHelper(object):
args = parser.parse_args()
return args
@staticmethod
def printSystemInfo(prefix):
"""Print system information to stdout. Print prefix first."""
if prefix:
Utils.Print(str(prefix))
clientVersion=Cluster.getClientVersion()
Utils.Print("UTC time: %s" % str(datetime.utcnow()))
Utils.Print("EOS Client version: %s" % (clientVersion))
Utils.Print("Processor: %s" % (platform.processor()))
Utils.Print("OS name: %s" % (platform.platform()))
@staticmethod
# pylint: disable=too-many-arguments
def shutdown(cluster, walletMgr, testSuccessful=True, killEosInstances=True, killWallet=True, keepLogs=False, cleanRun=True, dumpErrorDetails=False):
......
......@@ -54,7 +54,7 @@ cluster=Cluster()
(fd, nodesFile) = tempfile.mkstemp()
try:
Print("BEGIN")
TestHelper.printSystemInfo("BEGIN")
cluster.killall(allInstances=killAll)
cluster.cleanup()
......
......@@ -59,7 +59,7 @@ ClientName="cleos"
# Utils.setMongoSyncTime(50)
try:
Print("BEGIN")
TestHelper.printSystemInfo("BEGIN")
Print("SERVER: %s" % (server))
Print("PORT: %d" % (port))
......
......@@ -56,6 +56,8 @@ cluster=Cluster(walletd=True)
walletMgr=WalletMgr(True)
try:
TestHelper.printSystemInfo("BEGIN")
cluster.setChainStrategy(chainSyncStrategyStr)
cluster.setWalletMgr(walletMgr)
......
......@@ -62,6 +62,8 @@ random.seed(seed) # Use a fixed seed for repeatability.
cluster=Cluster(walletd=True)
try:
TestHelper.printSystemInfo("BEGIN")
cluster.setChainStrategy(chainSyncStrategyStr)
cluster.killall(allInstances=killAll)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册