2018-07-12 15:28:59 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# This script is executed inside the builder image
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2018-11-15 08:04:58 +01:00
|
|
|
PASS_ARGS="$@"
|
|
|
|
|
2018-07-12 15:28:59 +02:00
|
|
|
source ./ci/matrix.sh
|
|
|
|
|
2019-05-22 23:21:21 +02:00
|
|
|
if [ "$RUN_INTEGRATIONTESTS" != "true" ]; then
|
2018-07-12 15:28:59 +02:00
|
|
|
echo "Skipping integration tests"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
export LD_LIBRARY_PATH=$BUILD_DIR/depends/$HOST/lib
|
|
|
|
|
|
|
|
cd build-ci/dashcore-$BUILD_TARGET
|
|
|
|
|
2019-10-16 11:48:46 +02:00
|
|
|
set +e
|
2020-03-27 22:58:51 +01:00
|
|
|
./test/functional/test_runner.py --ci --coverage --failfast --nocleanup --tmpdir=$(pwd)/testdatadirs $PASS_ARGS
|
2019-10-16 11:48:46 +02:00
|
|
|
RESULT=$?
|
|
|
|
set -e
|
|
|
|
|
|
|
|
echo "Collecting logs..."
|
|
|
|
BASEDIR=$(ls testdatadirs)
|
|
|
|
if [ "$BASEDIR" != "" ]; then
|
|
|
|
mkdir testlogs
|
|
|
|
for d in $(ls testdatadirs/$BASEDIR | grep -v '^cache$'); do
|
|
|
|
mkdir testlogs/$d
|
|
|
|
./test/functional/combine_logs.py -c ./testdatadirs/$BASEDIR/$d > ./testlogs/$d/combined.log
|
|
|
|
./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
|