Add zerocash-specific tests.
This commit is contained in:
41
qa/zerocash/ensure-no-dot-so-in-depends.py
Executable file
41
qa/zerocash/ensure-no-dot-so-in-depends.py
Executable file
@@ -0,0 +1,41 @@
|
|||||||
|
#! /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()
|
||||||
40
qa/zerocash/full-test-suite.sh
Executable file
40
qa/zerocash/full-test-suite.sh
Executable file
@@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Execute all of the automated tests related to zerocash.
|
||||||
|
#
|
||||||
|
# This script will someday define part of our acceptance criteria for
|
||||||
|
# pull requests.
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
SUITE_EXIT_STATUS=0
|
||||||
|
REPOROOT="$(readlink -f "$(dirname "$0")"/../../)"
|
||||||
|
|
||||||
|
function run_test_phase
|
||||||
|
{
|
||||||
|
echo "===== BEGIN: $*"
|
||||||
|
set +e
|
||||||
|
eval "$@"
|
||||||
|
if [ $? -eq 0 ]
|
||||||
|
then
|
||||||
|
echo "===== PASSED: $*"
|
||||||
|
else
|
||||||
|
echo "===== FAILED: $*"
|
||||||
|
SUITE_EXIT_STATUS=1
|
||||||
|
fi
|
||||||
|
set -e
|
||||||
|
}
|
||||||
|
|
||||||
|
cd "${REPOROOT}"
|
||||||
|
|
||||||
|
# Test phases:
|
||||||
|
run_test_phase "${REPOROOT}/qa/zerocash/ensure-no-dot-so-in-depends.py"
|
||||||
|
run_test_phase make check
|
||||||
|
|
||||||
|
exit $SUITE_EXIT_STATUS
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user