mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 09:14:17 +01:00
MDEV-33750: Increase MTR verbosity and unify skip test lists usage
- Unify on MTR_SKIP_TEST_LIST in both d/rules and autopkgtests - Unify MTR command in both d/rules and autopkgtests - Make d/rules section more verbose to help debugging why tests sometimes ran and sometimes not - If MTR fails, make the log a bit more verbose (inspired by https://github.com/MariaDB/buildbot/pull/76/files)
This commit is contained in:
parent
f79f3ada24
commit
5000d1ba6e
2 changed files with 30 additions and 24 deletions
21
debian/rules
vendored
21
debian/rules
vendored
|
@ -111,16 +111,23 @@ override_dh_auto_build:
|
||||||
override_dh_auto_test:
|
override_dh_auto_test:
|
||||||
@echo "RULES.$@"
|
@echo "RULES.$@"
|
||||||
dh_testdir
|
dh_testdir
|
||||||
# Ensure at least an empty file exists
|
# Skip running test suite after build if DEB_BUILD_OPTIONS contains 'nocheck'
|
||||||
touch mysql-test/unstable-tests
|
@echo "DEB_BUILD_OPTIONS: $(DEB_BUILD_OPTIONS)"
|
||||||
# Skip unstable tests if such are defined for arch
|
|
||||||
[ ! -f debian/unstable-tests.$(DEB_HOST_ARCH) ] || cat debian/unstable-tests.$(DEB_HOST_ARCH) >> mysql-test/unstable-tests
|
|
||||||
# Run testsuite
|
|
||||||
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
|
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
|
||||||
|
# Skip unstable tests if such are defined for arch
|
||||||
|
[ ! -f debian/unstable-tests.$(DEB_HOST_ARCH) ] || cat debian/unstable-tests.$(DEB_HOST_ARCH) >> $(MTR_SKIP_TEST_LIST)
|
||||||
|
# Show contents of skip list on this architecture
|
||||||
|
@echo "On architecture $(DEB_HOST_ARCH) skip tests:"
|
||||||
|
cat $(MTR_SKIP_TEST_LIST)
|
||||||
|
# Run testsuite
|
||||||
cd $(BUILDDIR)/mysql-test && \
|
cd $(BUILDDIR)/mysql-test && \
|
||||||
./mtr --force --mem \
|
export MTR_PRINT_CORE=detailed && \
|
||||||
|
./mtr --force --testcase-timeout=120 --suite-timeout=540 --retry=3 \
|
||||||
|
--verbose-restart --max-save-core=1 --max-save-datadir=1 \
|
||||||
--parallel=$(NUMJOBS) --skip-rpl --suite=main \
|
--parallel=$(NUMJOBS) --skip-rpl --suite=main \
|
||||||
--skip-test-list=unstable-tests
|
--skip-test-list=$(MTR_SKIP_TEST_LIST)
|
||||||
|
# Don't use --mem here as official Debian builders and most Docker systems don't have a large mem device available and
|
||||||
|
# would fail with errors on lack of disk space.
|
||||||
endif
|
endif
|
||||||
|
|
||||||
override_dh_auto_install:
|
override_dh_auto_install:
|
||||||
|
|
31
debian/tests/upstream
vendored
31
debian/tests/upstream
vendored
|
@ -9,11 +9,11 @@
|
||||||
echo "Running test 'testsuite'"
|
echo "Running test 'testsuite'"
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
SKIP_TEST_LST="/tmp/skip-test.lst"
|
MTR_SKIP_TEST_LIST=$(mktemp)
|
||||||
ARCH=$(dpkg --print-architecture)
|
ARCH=$(dpkg --print-architecture)
|
||||||
|
|
||||||
WORKDIR=$(mktemp -d)
|
WORKDIR=$(mktemp -d)
|
||||||
trap 'rm -rf $WORKDIR $SKIP_TEST_LST' 0 INT QUIT ABRT PIPE TERM
|
trap 'rm -rf $WORKDIR $MTR_SKIP_TEST_LIST' 0 INT QUIT ABRT PIPE TERM
|
||||||
cd "$WORKDIR"
|
cd "$WORKDIR"
|
||||||
|
|
||||||
mkdir var
|
mkdir var
|
||||||
|
@ -24,18 +24,14 @@ echo "using tmpdir: $WORKDIR/tmp"
|
||||||
|
|
||||||
echo "Setting up skip-tests-list"
|
echo "Setting up skip-tests-list"
|
||||||
|
|
||||||
# Use unstable-tests list as base to skip all tests considered unstable
|
# Use the arch specific skiplists if exist, otherwise list is empty
|
||||||
# or create an empty file if that upstream file does not exists on this branch
|
|
||||||
cp /usr/share/mysql/mysql-test/unstable-tests $SKIP_TEST_LST || touch $SKIP_TEST_LST
|
|
||||||
|
|
||||||
# Also use the arch specific skiplists if exist
|
|
||||||
if [ -f /usr/share/mysql/mysql-test/unstable-tests.$ARCH ]
|
if [ -f /usr/share/mysql/mysql-test/unstable-tests.$ARCH ]
|
||||||
then
|
then
|
||||||
cat /usr/share/mysql/mysql-test/unstable-tests.$ARCH >> $SKIP_TEST_LST
|
cat /usr/share/mysql/mysql-test/unstable-tests.$ARCH >> $MTR_SKIP_TEST_LIST
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Skip tests that cannot run properly on ci.debian.net / autopkgtests.ubuntu.com
|
# Skip tests that cannot run properly on ci.debian.net / autopkgtests.ubuntu.com
|
||||||
cat >> $SKIP_TEST_LST << EOF
|
cat >> $MTR_SKIP_TEST_LIST << EOF
|
||||||
binlog.binlog_server_start_options : Requires writable /usr
|
binlog.binlog_server_start_options : Requires writable /usr
|
||||||
main.ctype_uca : Requires writable /usr
|
main.ctype_uca : Requires writable /usr
|
||||||
rpl.rpl_gtid_mode : Requires starting server as root ref http://bugs.mysql.com/bug.php?id=70517
|
rpl.rpl_gtid_mode : Requires starting server as root ref http://bugs.mysql.com/bug.php?id=70517
|
||||||
|
@ -44,28 +40,31 @@ EOF
|
||||||
# Skip tests that cannot run properly on Gitlab-CI
|
# Skip tests that cannot run properly on Gitlab-CI
|
||||||
if [ ! -z "$GITLAB_CI" ]
|
if [ ! -z "$GITLAB_CI" ]
|
||||||
then
|
then
|
||||||
cat >> $SKIP_TEST_LST << EOF
|
cat >> $MTR_SKIP_TEST_LIST << EOF
|
||||||
main.mysqld--help : For unknown reason table-cache is 4000 instead of default 421
|
main.mysqld--help : For unknown reason table-cache is 4000 instead of default 421
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$ARCH" = "s390x" ]
|
if [ "$ARCH" = "s390x" ]
|
||||||
then
|
then
|
||||||
echo "main.func_regexp_pcre : recursion fails on s390x https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1723947" >> $SKIP_TEST_LST
|
echo "main.func_regexp_pcre : recursion fails on s390x https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1723947" >> $MTR_SKIP_TEST_LIST
|
||||||
elif [ "$ARCH" = "armhf" ] || [ "$ARCH" = "i386" ]
|
elif [ "$ARCH" = "armhf" ] || [ "$ARCH" = "i386" ]
|
||||||
then
|
then
|
||||||
echo "main.failed_auth_unixsocket : Test returns wrong exit code on armhf and i386 (but only in debci) https://jira.mariadb.org/browse/MDEV-23933" >> $SKIP_TEST_LST
|
echo "main.failed_auth_unixsocket : Test returns wrong exit code on armhf and i386 (but only in debci) https://jira.mariadb.org/browse/MDEV-23933" >> $MTR_SKIP_TEST_LIST
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Store skipped test list in artifacts so it can be viewed while debugging
|
# Store skipped test list in artifacts so it can be viewed while debugging
|
||||||
# failed autopkgtest runs
|
# failed autopkgtest runs
|
||||||
cp -v $SKIP_TEST_LST $AUTOPKGTEST_ARTIFACTS
|
cp -v $MTR_SKIP_TEST_LIST $AUTOPKGTEST_ARTIFACTS
|
||||||
|
|
||||||
cd /usr/share/mysql/mysql-test
|
cd /usr/share/mysql/mysql-test
|
||||||
echo "starting mysql-test-tun.pl..."
|
echo "starting mysql-test-tun.pl..."
|
||||||
eatmydata perl -I. ./mysql-test-run.pl --suite=main \
|
export MTR_PRINT_CORE=detailed
|
||||||
|
eatmydata perl -I. ./mysql-test-run.pl \
|
||||||
|
--force --testcase-timeout=120 --suite-timeout=540 --retry=3 \
|
||||||
|
--verbose-restart --max-save-core=1 --max-save-datadir=1 \
|
||||||
|
--parallel=auto --skip-rpl --suite=main \
|
||||||
|
--skip-test-list=$MTR_SKIP_TEST_LIST \
|
||||||
--vardir="$WORKDIR/var" --tmpdir="$WORKDIR/tmp" \
|
--vardir="$WORKDIR/var" --tmpdir="$WORKDIR/tmp" \
|
||||||
--parallel=auto --skip-rpl \
|
|
||||||
--force --skip-test-list=$SKIP_TEST_LST \
|
|
||||||
--xml-report=$AUTOPKGTEST_ARTIFACTS/mysql-test-run-junit.xml $@ 2>&1
|
--xml-report=$AUTOPKGTEST_ARTIFACTS/mysql-test-run-junit.xml $@ 2>&1
|
||||||
echo "run: OK"
|
echo "run: OK"
|
||||||
|
|
Loading…
Add table
Reference in a new issue