summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2016-08-18 12:47:20 +0400
committerSergey Vojtovich <svoj@mariadb.org>2016-08-18 12:49:04 +0400
commitdaff133ddf9a9d120050703c0b5753979c6190e0 (patch)
tree8847835f515af17d6c090300b138c31e1226731e /debian
parent69052ed022063d0770ad4562a1dd42572067547e (diff)
downloadmariadb-git-daff133ddf9a9d120050703c0b5753979c6190e0.tar.gz
MDEV-9185 - Integrate with Travis-CI for easier and more automatic QA
Based on contributions by Daniel Black and Otto Kekäläinen.
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/autobake-deb.sh14
-rwxr-xr-xdebian/rules19
2 files changed, 17 insertions, 16 deletions
diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh
index 6f4109515e6..b597ec036b3 100755
--- a/debian/autobake-deb.sh
+++ b/debian/autobake-deb.sh
@@ -10,10 +10,16 @@ set -e
# Debug script and command lines
#set -x
-# Don't run the mysql-test-run test suite as part of build.
+# On Buildbot, don't run the mysql-test-run test suite as part of build.
# It takes a lot of time, and we will do a better test anyway in
# Buildbot, running the test suite from installed .debs on a clean VM.
-export DEB_BUILD_OPTIONS="nocheck"
+# On Travis-CI we want to simulate the full build, including tests.
+# Also on Travis-CI it is useful not to override the DEB_BUILD_OPTIONS
+# at this stage at all.
+if [[ ! $TRAVIS ]]
+then
+ export DEB_BUILD_OPTIONS="nocheck"
+fi
export MARIADB_OPTIONAL_DEBS=""
@@ -32,8 +38,8 @@ LOGSTRING="MariaDB build"
CODENAME="$(lsb_release -sc)"
# add libcrack2 (>= 2.9.0) as a build dependency
-# but only where the distribution can possibly satisfy it
-if apt-cache madison cracklib2|grep 'cracklib2 *| *2\.[0-8]\.' >/dev/null 2>&1
+# but only where the distribution can possibly satisfy it and if not on Travis-CI
+if $TRAVIS || apt-cache madison cracklib2|grep 'cracklib2 *| *2\.[0-8]\.' >/dev/null 2>&1
then
# Anything in MARIADB_OPTIONAL_DEBS is omitted from the resulting
# packages by snipped in rules file
diff --git a/debian/rules b/debian/rules
index 7f134af24a8..2591e0070a4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -29,20 +29,15 @@ ifeq (${MAKE_J}, -j0)
MAKE_J = -j1
endif
-MAKE_TEST_TARGET=test-force
-ifneq ($(findstring fulltest,$(DEB_BUILD_OPTIONS)),)
-# make test-bt is the testsuite run by the MySQL build team
-# before a release, but it is long
- MAKE_TEST_TARGET=test-bt
+# Parallel build support as advised
+# at https://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ MAKEFLAGS += -j $(NUMJOBS)
endif
-USE_ASSEMBLER=--enable-assembler
-ifneq (,$(filter $(ARCH), amd64 i386 ia64 s390))
- TESTSUITE_FAIL_CMD=exit 1
-else
- TESTSUITE_FAIL_CMD=true
-endif
+USE_ASSEMBLER=--enable-assembler
BUILDDIR = builddir
builddir = $(BUILDDIR)
@@ -88,7 +83,7 @@ build-stamp: configure
ifeq ($(findstring nocheck,$(DEB_BUILD_OPTIONS)),)
if [ ! -f testsuite-stamp ] ; then \
- cd $(builddir) && $(MAKE) $(MAKE_TEST_TARGET) || $(TESTSUITE_FAIL_CMD) ; \
+ cd $(builddir)/mysql-test && ./mtr --force --parallel=$(NUMJOBS) --skip-rpl --suite=main; \
fi
endif