mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
4c2211dd41
414326952c use export LC_ALL=C.UTF-8 (Julian Fleischer) 728c82d029 make script exit if a command fails (Julian Fleischer) 506890b24d move remaining travis build steps into individual files (Julian Fleischer) 272306ea57 number .travis/ script according to build lifecycle and add README to explain (Julian Fleischer) 519e2739cf move lint stage up to resemble travis build ui (Julian Fleischer) 86d34f0e65 abort script in END_FOLD on non-zero exit code (Julian Fleischer) 4f2f88c7b0 move script sections info individual files and comply with shellcheck (Julian Fleischer) Pull request description: This PR is extracted from https://github.com/bitcoin/bitcoin/pull/13816 to make that one easier to review. It follows on https://github.com/bitcoin/bitcoin/pull/13849 and https://github.com/bitcoin/bitcoin/pull/13851 In here the shell script parts from `travis.yml` are extracted into `.travis/before_install.sh`, `.travis/install.sh`, `.travis/before_script.sh`, `.travis/script.sh`, and `.travis/lint.sh`. This has the benefit that `test/lint/lint-shell.sh` will also shellcheck these parts. Also it makes the individual script parts more readable. Tree-SHA512: c497e1687ceb1c1d795de177d3fc35af908bc8e3f781a871afabdecf031e581d4db229290627249e35ef7c09952bc34884e4734ea91d40f57b4a9efb85bba2e3
66 lines
1.6 KiB
Bash
Executable File
66 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# This script is executed inside the builder image
|
|
|
|
export LC_ALL=C.UTF-8
|
|
|
|
set -e
|
|
|
|
PASS_ARGS="$*"
|
|
|
|
source ./ci/matrix.sh
|
|
|
|
if [ "$RUN_INTEGRATIONTESTS" != "true" ]; then
|
|
echo "Skipping integration tests"
|
|
exit 0
|
|
fi
|
|
|
|
export LD_LIBRARY_PATH=$BUILD_DIR/depends/$HOST/lib
|
|
|
|
cd build-ci/dashcore-$BUILD_TARGET
|
|
|
|
if [ "$SOCKETEVENTS" = "" ]; then
|
|
# Let's switch socketevents mode to some random mode
|
|
R=$(($RANDOM%3))
|
|
if [ "$R" == "0" ]; then
|
|
SOCKETEVENTS="select"
|
|
elif [ "$R" == "1" ]; then
|
|
SOCKETEVENTS="poll"
|
|
else
|
|
SOCKETEVENTS="epoll"
|
|
fi
|
|
fi
|
|
echo "Using socketevents mode: $SOCKETEVENTS"
|
|
EXTRA_ARGS="--dashd-arg=-socketevents=$SOCKETEVENTS"
|
|
|
|
set +e
|
|
./test/functional/test_runner.py --ci --combinedlogslen=4000 --coverage --failfast --nocleanup --tmpdir=$(pwd)/testdatadirs $PASS_ARGS $EXTRA_ARGS
|
|
RESULT=$?
|
|
set -e
|
|
|
|
echo "Collecting logs..."
|
|
BASEDIR=$(ls testdatadirs)
|
|
if [ "$BASEDIR" != "" ]; then
|
|
mkdir testlogs
|
|
TESTDATADIRS=$(ls testdatadirs/$BASEDIR)
|
|
for d in $TESTDATADIRS; do
|
|
[[ "$d" ]] || break # found nothing
|
|
[[ "$d" != "cache" ]] || continue # skip cache dir
|
|
mkdir testlogs/$d
|
|
PYTHONIOENCODING=UTF-8 ./test/functional/combine_logs.py -c ./testdatadirs/$BASEDIR/$d > ./testlogs/$d/combined.log
|
|
PYTHONIOENCODING=UTF-8 ./test/functional/combine_logs.py --html ./testdatadirs/$BASEDIR/$d > ./testlogs/$d/combined.html
|
|
cd testdatadirs/$BASEDIR/$d
|
|
LOGFILES="$(find . -name 'debug.log' -or -name "test_framework.log")"
|
|
cd ../../..
|
|
for f in $LOGFILES; do
|
|
d2="testlogs/$d/$(dirname $f)"
|
|
mkdir -p $d2
|
|
cp testdatadirs/$BASEDIR/$d/$f $d2/
|
|
done
|
|
done
|
|
fi
|
|
|
|
mv testlogs ../../
|
|
|
|
exit $RESULT
|