/[gentoo-x86]/dev-db/mariadb/mariadb-5.5.28.ebuild
Gentoo

Contents of /dev-db/mariadb/mariadb-5.5.28.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Fri Nov 2 00:19:23 2012 UTC (20 months, 1 week ago) by robbat2
Branch: MAIN
Copy from overlay.

(Portage version: 2.2.0_alpha121/cvs/Linux x86_64, RepoMan options: --force)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="4"
6 MY_EXTRAS_VER="20120906-1344Z"
7
8 # Build system
9 BUILD="cmake"
10
11 inherit toolchain-funcs mysql-v2
12 # only to make repoman happy. it is really set in the eclass
13 IUSE="$IUSE"
14
15 # REMEMBER: also update eclass/mysql*.eclass before committing!
16 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
17
18 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
19 EPATCH_EXCLUDE=''
20
21 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
22 RDEPEND="${RDEPEND}"
23
24 # Please do not add a naive src_unpack to this ebuild
25 # If you want to add a single patch, copy the ebuild to an overlay
26 # and create your own mysql-extras tarball, looking at 000_index.txt
27 src_prepare() {
28 sed -i \
29 -e '/^noinst_PROGRAMS/s/basic-t//g' \
30 "${S}"/unittest/mytap/t/Makefile.am
31 mysql-v2_src_prepare
32 }
33
34 # Official test instructions:
35 # USE='berkdb -cluster embedded extraengine perl ssl community' \
36 # FEATURES='test userpriv -usersandbox' \
37 # ebuild mariadb-X.X.XX.ebuild \
38 # digest clean package
39 src_test() {
40
41 local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test"
42 local retstatus_unit
43 local retstatus_tests
44
45 # Bug #213475 - MySQL _will_ object strenously if your machine is named
46 # localhost. Also causes weird failures.
47 [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
48
49 if ! use "minimal" ; then
50
51 if [[ $UID -eq 0 ]]; then
52 die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
53 fi
54 has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
55
56 einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
57 addpredict /this-dir-does-not-exist/t9.MYI
58
59 # Run CTest (test-units)
60 cmake-utils_src_test
61 retstatus_unit=$?
62 [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
63
64 # Ensure that parallel runs don't die
65 export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
66
67 # create directories because mysqladmin might right out of order
68 mkdir -p "${S}"/mysql-test/var-{tests}{,/log}
69
70 # These are failing in MySQL 5.5 for now and are believed to be
71 # false positives:
72 #
73 # main.information_schema, binlog.binlog_statement_insert_delayed,
74 # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql,
75 # funcs_1.is_columns_mysql
76 # fails due to USE=-latin1 / utf8 default
77 #
78 # main.mysql_client_test, main.mysql_client_test_nonblock:
79 # segfaults at random under Portage only, suspect resource limits.
80 #
81 # sys_vars.plugin_dir_basic
82 # fails because PLUGIN_DIR is set to MYSQL_LIBDIR64/plugin
83 # instead of MYSQL_LIBDIR/plugin
84 #
85 # main.flush_read_lock_kill
86 # fails because of unknown system variable 'DEBUG_SYNC'
87 #
88 # main.openssl_1
89 # error message changing
90 # -mysqltest: Could not open connection 'default': 2026 SSL connection
91 # error: ASN: bad other signature confirmation
92 # +mysqltest: Could not open connection 'default': 2026 SSL connection
93 # error: error:00000001:lib(0):func(0):reason(1)
94 #
95 # plugins.unix_socket
96 # fails because portage strips out the USER enviornment variable
97 #
98
99 for t in main.mysql_client_test main.mysql_client_test_nonblock \
100 binlog.binlog_statement_insert_delayed main.information_schema \
101 main.mysqld--help main.flush_read_lock_kill \
102 sys_vars.plugin_dir_basic main.openssl_1 plugins.unix_socket \
103 funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do
104 mysql-v2_disable_test "$t" "False positives in Gentoo"
105 done
106
107 # Run mysql tests
108 pushd "${TESTDIR}"
109
110 # run mysql-test tests
111 perl mysql-test-run.pl --force --vardir="${S}/mysql-test/var-tests"
112 retstatus_tests=$?
113 [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
114 has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
115
116 popd
117
118 # Cleanup is important for these testcases.
119 pkill -9 -f "${S}/ndb" 2>/dev/null
120 pkill -9 -f "${S}/sql" 2>/dev/null
121
122 failures=""
123 [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
124 [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
125 has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
126
127 [[ -z "$failures" ]] || die "Test failures: $failures"
128 einfo "Tests successfully completed"
129
130 else
131
132 einfo "Skipping server tests due to minimal build."
133 fi
134 }

  ViewVC Help
Powered by ViewVC 1.1.20