summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs
diff options
context:
space:
mode:
authorChi Xu <chi.xu@windriver.com>2023-09-17 13:52:37 +0800
committerKhem Raj <raj.khem@gmail.com>2023-09-16 23:40:23 -0700
commitc332fd2659c9bc1a532273b520284dcdaaa8ddf1 (patch)
treef4263509212ea6defc0bc2d0a8c29d1d14d11c3b /meta-oe/recipes-dbs
parent9bc3399e9766fc7cb16f78e654db31d1c29eb504 (diff)
downloadmeta-openembedded-c332fd2659c9bc1a532273b520284dcdaaa8ddf1.tar.gz
mariadb: Add ptest support
69 test cases in all, and all of them are PASS. Test results: root@intel-x86-64:~# ptest-runner mariadb START: ptest-runner 2023-09-17T05:38 BEGIN: /usr/lib/mariadb/ptest PASS: strings PASS: json PASS: simple PASS: skip PASS: todo PASS: skip_all PASS: no_plan PASS: bitmap PASS: base64 PASS: my_atomic PASS: my_rdtsc PASS: lf PASS: my_malloc PASS: my_getopt PASS: dynstring PASS: byte_order PASS: queues PASS: stacktrace PASS: crc32 PASS: my_vsnprintf PASS: aes PASS: ma_dyncol PASS: my_decimal PASS: json_lib PASS: json_normalize PASS: my_apc PASS: explain_filename PASS: mf_iocache PASS: my_json_writer PASS: innodb_fts PASS: innodb_sync PASS: ma_control_file PASS: trnman PASS: ma_test_loghandler PASS: ma_test_loghandler_multigroup PASS: ma_test_loghandler_multithread PASS: ma_test_loghandler_pagecache PASS: ma_test_loghandler_long PASS: ma_test_loghandler_noflush PASS: ma_test_loghandler_first_lsn PASS: ma_test_loghandler_max_lsn PASS: ma_test_loghandler_purge PASS: ma_test_loghandler_readonly PASS: ma_test_loghandler_nologs PASS: ma_pagecache_single_1k PASS: ma_pagecache_single_8k PASS: ma_pagecache_single_64k PASS: ma_pagecache_consist_1k PASS: ma_pagecache_consist_64k PASS: ma_pagecache_consist_1kHC PASS: ma_pagecache_consist_64kHC PASS: ma_pagecache_consist_1kRD PASS: ma_pagecache_consist_64kRD PASS: ma_pagecache_consist_1kWR PASS: ma_pagecache_consist_64kWR PASS: ma_pagecache_rwconsist_1k PASS: ma_pagecache_rwconsist2_1k PASS: pfs_instr_class PASS: pfs_instr_class-oom PASS: pfs_instr PASS: pfs_instr-oom PASS: pfs_account-oom PASS: pfs_host-oom PASS: pfs_timer PASS: pfs_user-oom PASS: pfs_noop PASS: pfs PASS: pfs_misc PASS: dbug DURATION: 59 END: /usr/lib/mariadb/ptest 2023-09-17T05:39 STOP: ptest-runner TOTAL: 1 FAIL: 0 Signed-off-by: Chi Xu <chi.xu@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-dbs')
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb/run-ptest20
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb_10.11.5.bb31
2 files changed, 51 insertions, 0 deletions
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