summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/conf/include/ptest-packagelists-meta-oe.inc1
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb/run-ptest20
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb_10.11.5.bb31
3 files changed, 52 insertions, 0 deletions
diff --git a/meta-oe/conf/include/ptest-packagelists-meta-oe.inc b/meta-oe/conf/include/ptest-packagelists-meta-oe.inc
index 06f3e1605..cafc43e01 100644
--- a/meta-oe/conf/include/ptest-packagelists-meta-oe.inc
+++ b/meta-oe/conf/include/ptest-packagelists-meta-oe.inc
@@ -49,6 +49,7 @@ PTESTS_SLOW_META_OE = "\
49 fftw \ 49 fftw \
50 libusb-compat \ 50 libusb-compat \
51 rsyslog \ 51 rsyslog \
52 mariadb \
52" 53"
53 54
54PTESTS_PROBLEMS_META_OE ="\ 55PTESTS_PROBLEMS_META_OE ="\
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/run-ptest b/meta-oe/recipes-dbs/mysql/mariadb/run-ptest
new file mode 100644
index 000000000..2f905cd37
--- /dev/null
+++ b/meta-oe/recipes-dbs/mysql/mariadb/run-ptest
@@ -0,0 +1,20 @@
1#!/bin/sh
2
3# test case test-connect is excluded. Becasue this test case need following steps before running.
4# Without these steps, test case test-connect will fail.
5# 1. Disable 'skip-networking' in /etc/my.cnf
6# $ sed -i '/skip-networking/s/^/#/g' /etc/my.cnf
7# 2. Restart mysqld.service
8# $ systemctl restart mysqld
9# 3. Set password for MySQL user "root"
10# $ mysql -u root
11# MariaDB [(none)]> SET PASSWORD FOR "root"@"localhost" = PASSWORD("myReallyStrongPwd");
12# MariaDB [(none)]> FLUSH PRIVILEGES;
13
14# If test-connect is included, please uncomment these lines.
15#export MASTER_MYPORT=3306
16#export MYSQL_TEST_HOST=127.0.0.1
17#export MYSQL_TEST_USER=root
18#export MYSQL_TEST_PASSWD=myReallyStrongPwd
19
20ctest --force-new-ctest-process -E test-connect | sed -u 's/\*\*\*/ /g' | awk '/Test +#/{gsub(/Passed/,"PASS"); gsub(/Failed/,"FAIL"); gsub(/Skipped/,"SKIP"); print $6": "$4; fflush();}'
diff --git a/meta-oe/recipes-dbs/mysql/mariadb_10.11.5.bb b/meta-oe/recipes-dbs/mysql/mariadb_10.11.5.bb
index 87faabfa2..a4498fa44 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb_10.11.5.bb
+++ b/meta-oe/recipes-dbs/mysql/mariadb_10.11.5.bb
@@ -1,5 +1,36 @@
1require mariadb.inc 1require mariadb.inc
2 2
3inherit ptest
4SRC_URI += "${@bb.utils.contains('PTEST_ENABLED', '1', 'file://run-ptest', '', d)}"
5DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'rsync-native', '', d)}"
6RDEPENDS:${PN}-ptest += "cmake sed perl-module-test-more"
7
8do_install_ptest () {
9 rsync -a ${B}/unittest ${B}/dbug ${D}${PTEST_PATH} \
10 --exclude CMakeFiles \
11 --exclude cmake_install.cmake \
12 --exclude Makefile \
13 --exclude=*.a \
14 --exclude=*.h \
15 --exclude=*.o \
16 --exclude=*.so \
17 --exclude=*.d \
18 --exclude=*.txt
19 install -m 0755 -d ${D}${PTEST_PATH}/storage
20 rsync -a ${B}/storage/maria ${B}/storage/perfschema ${B}/storage/innobase ${D}${PTEST_PATH}/storage \
21 --exclude CMakeFiles \
22 --exclude cmake_install.cmake \
23 --exclude Makefile \
24 --exclude=*.a \
25 --exclude=*.h \
26 --exclude=*.o \
27 --exclude=*.so \
28 --exclude=*.d \
29 --exclude=*.txt
30 cp -r ${B}/CTestTestfile.cmake ${D}${PTEST_PATH}
31 sed -i -e 's#${WORKDIR}##g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
32}
33
3DEPENDS += "mariadb-native bison-native boost libpcre2 curl ncurses \ 34DEPENDS += "mariadb-native bison-native boost libpcre2 curl ncurses \
4 zlib libaio libedit libevent libxml2 gnutls fmt lzo zstd" 35 zlib libaio libedit libevent libxml2 gnutls fmt lzo zstd"
5 36