diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-10-16 13:04:42 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-10-16 13:04:42 +0200 |
commit | ee9afef27141f55165009fdbd58e54942f3a6867 (patch) | |
tree | b5e15e62e10daa40aef3e6d33eeabf9205d1be0f /support-files/mysql.spec.sh | |
parent | d9a8799205d160688f81362356dd2323eb8a91ea (diff) | |
parent | a619bfad30c13207fb0453a85af5740846186900 (diff) | |
download | mariadb-git-ee9afef27141f55165009fdbd58e54942f3a6867.tar.gz |
mysql-5.5.28
Diffstat (limited to 'support-files/mysql.spec.sh')
-rw-r--r-- | support-files/mysql.spec.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 5b9a296d90a..0d673e5b339 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -252,6 +252,9 @@ Vendor: %{mysql_vendor} Provides: msqlormysql MySQL-server mysql BuildRequires: %{distro_buildreq} +# Regression tests may take a long time, override the default to skip them +%{!?runselftest:%global runselftest 1} + # Think about what you use here since the first step is to # run a rm -rf BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -403,6 +406,16 @@ For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ ############################################################################## %build +# Fail quickly and obviously if user tries to build as root +%if %runselftest + if [ x"`id -u`" = x0 ]; then + echo "The MySQL regression tests may fail if run as root." + echo "If you really need to build the RPM as root, use" + echo "--define='runselftest 0' to skip the regression tests." + exit 1 + fi +%endif + # Be strict about variables, bail at earliest opportunity, etc. set -eu @@ -480,6 +493,13 @@ mkdir release make ${MAKE_JFLAG} VERBOSE=1 ) +%if %runselftest + MTR_BUILD_THREAD=auto + export MTR_BUILD_THREAD + + (cd release && make test-bt-fast || true) +%endif + ############################################################################## %install @@ -1146,6 +1166,14 @@ echo "=====" >> $STATUS_HISTORY # merging BK trees) ############################################################################## %changelog +* Tue Jul 24 2012 Joerg Bruehe <joerg.bruehe@oracle.com> + +- Add a macro "runselftest": + if set to 1 (default), the test suite will be run during the RPM build; + this can be oveeridden via the command line by adding + --define "runselftest 0" + Failures of the test suite will NOT make the RPM build fail! + * Wed Sep 28 2011 Joerg Bruehe <joerg.bruehe@oracle.com> - Fix duplicate mentioning of "mysql_plugin" and its manual page, |