Move ensure-no-dot-so-in-depends.py into full_test_suite.py
This commit is contained in:
parent
aadf3aa159
commit
105b2b6248
|
@ -1,41 +0,0 @@
|
||||||
#! /usr/bin/env python2
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
|
|
||||||
def main():
|
|
||||||
this_script = os.path.abspath(sys.argv[0])
|
|
||||||
basedir = os.path.dirname(this_script)
|
|
||||||
arch_dir = os.path.join(
|
|
||||||
basedir,
|
|
||||||
'..',
|
|
||||||
'..',
|
|
||||||
'depends',
|
|
||||||
'x86_64-unknown-linux-gnu',
|
|
||||||
)
|
|
||||||
|
|
||||||
exit_code = 0
|
|
||||||
|
|
||||||
if os.path.isdir(arch_dir):
|
|
||||||
lib_dir = os.path.join(arch_dir, 'lib')
|
|
||||||
libraries = os.listdir(lib_dir)
|
|
||||||
|
|
||||||
for lib in libraries:
|
|
||||||
if lib.find(".so") != -1:
|
|
||||||
print lib
|
|
||||||
exit_code = 1
|
|
||||||
else:
|
|
||||||
exit_code = 2
|
|
||||||
print "arch-specific build dir not present: {}".format(arch_dir)
|
|
||||||
print "Did you build the ./depends tree?"
|
|
||||||
print "Are you on a currently unsupported architecture?"
|
|
||||||
|
|
||||||
if exit_code == 0:
|
|
||||||
print "PASS."
|
|
||||||
else:
|
|
||||||
print "FAIL."
|
|
||||||
|
|
||||||
sys.exit(exit_code)
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
|
@ -20,6 +20,41 @@ def repofile(filename):
|
||||||
return os.path.join(REPOROOT, filename)
|
return os.path.join(REPOROOT, filename)
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Custom test runners
|
||||||
|
#
|
||||||
|
|
||||||
|
def ensure_no_dot_so_in_depends():
|
||||||
|
arch_dir = os.path.join(
|
||||||
|
REPOROOT,
|
||||||
|
'depends',
|
||||||
|
'x86_64-unknown-linux-gnu',
|
||||||
|
)
|
||||||
|
|
||||||
|
exit_code = 0
|
||||||
|
|
||||||
|
if os.path.isdir(arch_dir):
|
||||||
|
lib_dir = os.path.join(arch_dir, 'lib')
|
||||||
|
libraries = os.listdir(lib_dir)
|
||||||
|
|
||||||
|
for lib in libraries:
|
||||||
|
if lib.find(".so") != -1:
|
||||||
|
print lib
|
||||||
|
exit_code = 1
|
||||||
|
else:
|
||||||
|
exit_code = 2
|
||||||
|
print "arch-specific build dir not present: {}".format(arch_dir)
|
||||||
|
print "Did you build the ./depends tree?"
|
||||||
|
print "Are you on a currently unsupported architecture?"
|
||||||
|
|
||||||
|
if exit_code == 0:
|
||||||
|
print "PASS."
|
||||||
|
else:
|
||||||
|
print "FAIL."
|
||||||
|
|
||||||
|
return exit_code == 0
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Tests
|
# Tests
|
||||||
#
|
#
|
||||||
|
@ -38,7 +73,7 @@ STAGE_COMMANDS = {
|
||||||
'btest': [repofile('src/test/test_bitcoin'), '-p'],
|
'btest': [repofile('src/test/test_bitcoin'), '-p'],
|
||||||
'gtest': [repofile('src/zcash-gtest')],
|
'gtest': [repofile('src/zcash-gtest')],
|
||||||
'sec-hard': [repofile('qa/zcash/check-security-hardening.sh')],
|
'sec-hard': [repofile('qa/zcash/check-security-hardening.sh')],
|
||||||
'no-dot-so': [repofile('qa/zcash/ensure-no-dot-so-in-depends.py')],
|
'no-dot-so': ensure_no_dot_so_in_depends,
|
||||||
'secp256k1': ['make', '-C', repofile('src/secp256k1'), 'check'],
|
'secp256k1': ['make', '-C', repofile('src/secp256k1'), 'check'],
|
||||||
'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')],
|
||||||
|
@ -54,14 +89,18 @@ def run_stage(stage):
|
||||||
print('=' * (len(stage) + 14))
|
print('=' * (len(stage) + 14))
|
||||||
print
|
print
|
||||||
|
|
||||||
ret = subprocess.call(STAGE_COMMANDS[stage])
|
cmd = STAGE_COMMANDS[stage]
|
||||||
|
if type(cmd) == type([]):
|
||||||
|
ret = subprocess.call(cmd) == 0
|
||||||
|
else:
|
||||||
|
ret = cmd()
|
||||||
|
|
||||||
print
|
print
|
||||||
print('-' * (len(stage) + 15))
|
print('-' * (len(stage) + 15))
|
||||||
print('Finished stage %s' % stage)
|
print('Finished stage %s' % stage)
|
||||||
print
|
print
|
||||||
|
|
||||||
return ret == 0
|
return ret
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
|
|
Loading…
Reference in New Issue