mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
37edce56fb
5e1777777790e855a9f3c8604208bc9bd6c8c99f qa: Create unicode tempdir in test_runner (MarcoFalke) Pull request description: Now that wallet filenames are properly quoted when used for rpc (#13823), we can add some unicode symbols to the test_runner path. Thus, the "extern" wallet that uses a full path has a unicode symbol in its name. Should add unicode coverage to * `listwallets` * `wallet.getwalletinfo` * `(un)loadwallet` Tree-SHA512: 1633fde56f8748df0cfef9c31a878c105dfaac85d1041b292261f44c4d40e96942aacbf7d6e839e8bbf979dc131d81c24ceb521e927fc8a5a71ba093f36b891b
69 lines
1.7 KiB
Bash
Executable File
69 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# This script is executed inside the builder image
|
|
|
|
export LC_ALL=C
|
|
|
|
set -e
|
|
|
|
PASS_ARGS="$*"
|
|
|
|
source ./ci/matrix.sh
|
|
|
|
if [ "$RUN_INTEGRATIONTESTS" != "true" ]; then
|
|
echo "Skipping integration tests"
|
|
exit 0
|
|
fi
|
|
|
|
# override LC_ALL to allow special characters and emojis in filenames
|
|
export LC_ALL=C.UTF-8
|
|
|
|
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
|