Changeset View
Changeset View
Standalone View
Standalone View
test/util/bitcoin-util-test.py
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | def bctest(testDir, testObj, buildenv): | ||||
"""Runs a single test, comparing output and RC to expected output and RC. | """Runs a single test, comparing output and RC to expected output and RC. | ||||
Raises an error if input can't be read, executable fails, or output/RC | Raises an error if input can't be read, executable fails, or output/RC | ||||
are not as expected. Error is caught by bctester() and reported. | are not as expected. Error is caught by bctester() and reported. | ||||
""" | """ | ||||
# Get the exec names and arguments | # Get the exec names and arguments | ||||
execprog = os.path.join( | execprog = os.path.join( | ||||
buildenv["BUILDDIR"], "src", testObj["exec"] + buildenv["EXEEXT"]) | buildenv["BUILDDIR"], "src", testObj["exec"] + buildenv["EXEEXT"]) | ||||
execargs = ["-ecash=1"] + testObj['args'] | execargs = testObj['args'] | ||||
execrun = [execprog] + execargs | execrun = [execprog] + execargs | ||||
if buildenv["EMULATOR"]: | if buildenv["EMULATOR"]: | ||||
execrun = [buildenv["EMULATOR"]] + execrun | execrun = [buildenv["EMULATOR"]] + execrun | ||||
# Read the input data (if there is any) | # Read the input data (if there is any) | ||||
stdinCfg = None | stdinCfg = None | ||||
inputData = None | inputData = None | ||||
if "input" in testObj: | if "input" in testObj: | ||||
▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines |