Auto merge of #2672 - str4d:2667-test-driver-tweaks, r=str4d

Test driver tweaks for dynamic build steps

Part of #2252 and #2667.
This commit is contained in:
Homu
2017-10-18 19:34:50 -07:00

View File

@@ -129,6 +129,7 @@ STAGES = [
'no-dot-so', 'no-dot-so',
'util-test', 'util-test',
'secp256k1', 'secp256k1',
'libsnark',
'univalue', 'univalue',
'rpc', 'rpc',
] ]
@@ -140,6 +141,7 @@ STAGE_COMMANDS = {
'no-dot-so': ensure_no_dot_so_in_depends, 'no-dot-so': ensure_no_dot_so_in_depends,
'util-test': util_test, 'util-test': util_test,
'secp256k1': ['make', '-C', repofile('src/secp256k1'), 'check'], 'secp256k1': ['make', '-C', repofile('src/secp256k1'), 'check'],
'libsnark': ['make', '-C', repofile('src'), 'libsnark-tests'],
'univalue': ['make', '-C', repofile('src/univalue'), 'check'], 'univalue': ['make', '-C', repofile('src/univalue'), 'check'],
'rpc': [repofile('qa/pull-tester/rpc-tests.sh')], 'rpc': [repofile('qa/pull-tester/rpc-tests.sh')],
} }
@@ -169,10 +171,17 @@ def run_stage(stage):
def main(): def main():
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('--list-stages', dest='list', action='store_true')
parser.add_argument('stage', nargs='*', default=STAGES, parser.add_argument('stage', nargs='*', default=STAGES,
help='One of %s'%STAGES) help='One of %s'%STAGES)
args = parser.parse_args() args = parser.parse_args()
# Check for list
if args.list:
for s in STAGES:
print(s)
sys.exit(0)
# Check validity of stages # Check validity of stages
for s in args.stage: for s in args.stage:
if s not in STAGES: if s not in STAGES: