mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-10-02 14:44:06 +00:00
rocksdb: Add ptest support
# ./run-ptest PASS: arena_test PASS: cache_test PASS: db_basic_test PASS: env_basic_test PASS: testutil_test Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
parent
09d95e03ad
commit
7f741f817e
12
meta-oe/recipes-dbs/rocksdb/files/run-ptest
Normal file
12
meta-oe/recipes-dbs/rocksdb/files/run-ptest
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
ptestdir=$(dirname "$(readlink -f "$0")")
|
||||||
|
cd "$ptestdir"/tests || exit
|
||||||
|
|
||||||
|
for test in *_test; do
|
||||||
|
if ./${test} >/dev/null 2>&1; then
|
||||||
|
echo "PASS: ${test}"
|
||||||
|
else
|
||||||
|
echo "FAIL: ${test}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
@ -18,6 +18,7 @@ SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH};protocol=htt
|
|||||||
file://ppc64.patch \
|
file://ppc64.patch \
|
||||||
file://mips.patch \
|
file://mips.patch \
|
||||||
file://arm.patch \
|
file://arm.patch \
|
||||||
|
file://run-ptest \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI:append:riscv32 = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch"
|
SRC_URI:append:riscv32 = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch"
|
||||||
@ -27,7 +28,7 @@ SRC_URI:remove:toolchain-clang:riscv32 = "file://0001-replace-old-sync-with-new-
|
|||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
inherit cmake
|
inherit cmake ptest
|
||||||
|
|
||||||
PACKAGECONFIG ??= "bzip2 zlib lz4 gflags"
|
PACKAGECONFIG ??= "bzip2 zlib lz4 gflags"
|
||||||
PACKAGECONFIG[bzip2] = "-DWITH_BZ2=ON,-DWITH_BZ2=OFF,bzip2"
|
PACKAGECONFIG[bzip2] = "-DWITH_BZ2=ON,-DWITH_BZ2=OFF,bzip2"
|
||||||
@ -40,7 +41,7 @@ PACKAGECONFIG[gflags] = "-DWITH_GFLAGS=ON,-DWITH_GFLAGS=OFF,gflags"
|
|||||||
# Tools and tests currently don't compile on armv5 so we disable them
|
# Tools and tests currently don't compile on armv5 so we disable them
|
||||||
EXTRA_OECMAKE = "\
|
EXTRA_OECMAKE = "\
|
||||||
-DPORTABLE=ON \
|
-DPORTABLE=ON \
|
||||||
-DWITH_TESTS=OFF \
|
-DWITH_TESTS=${@bb.utils.contains("DISTRO_FEATURES", "ptest", "ON", "OFF", d)} \
|
||||||
-DWITH_BENCHMARK_TOOLS=OFF \
|
-DWITH_BENCHMARK_TOOLS=OFF \
|
||||||
-DWITH_TOOLS=OFF \
|
-DWITH_TOOLS=OFF \
|
||||||
-DFAIL_ON_WARNINGS=OFF \
|
-DFAIL_ON_WARNINGS=OFF \
|
||||||
@ -52,7 +53,21 @@ do_install:append() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
LDFLAGS:append:riscv64 = " -pthread"
|
LDFLAGS:append:riscv64 = " -pthread"
|
||||||
|
do_install_ptest() {
|
||||||
|
install -d ${D}${PTEST_PATH}/tests
|
||||||
|
# only cover the basic test as all the tests need to take about 6 hours
|
||||||
|
# time ./run-ptest
|
||||||
|
# real 356m32.956s
|
||||||
|
# user 252m32.004s
|
||||||
|
# sys 178m50.246s
|
||||||
|
install -m 0755 ${B}/env_basic_test ${D}${PTEST_PATH}/tests/
|
||||||
|
install -m 0755 ${B}/db_basic_test ${D}${PTEST_PATH}/tests/
|
||||||
|
install -m 0755 ${B}/arena_test ${D}${PTEST_PATH}/tests/
|
||||||
|
install -m 0755 ${B}/testutil_test ${D}${PTEST_PATH}/tests/
|
||||||
|
install -m 0755 ${B}/cache_test ${D}${PTEST_PATH}/tests/
|
||||||
|
}
|
||||||
|
|
||||||
# Need toku_time_now() implemented for ppc/musl
|
# Need toku_time_now() implemented for ppc/musl
|
||||||
# see utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
|
# see utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
|
||||||
COMPATIBLE_HOST:libc-musl:powerpc = "null"
|
COMPATIBLE_HOST:libc-musl:powerpc = "null"
|
||||||
|
COMPATIBLE_HOST:armv5 = 'null'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user