[oe] [meta-qt5] [PATCH] qttools: add ptest
Huang Qiyu
huangqy.fnst at cn.fujitsu.com
Wed Apr 12 10:20:44 UTC 2017
Add ptest for qttools by using provided testsuite.
Signed-off-by: Huang Qiyu <huangqy.fnst at cn.fujitsu.com>
---
recipes-qt/qt5/qttools/run-ptest | 4 ++++
recipes-qt/qt5/qttools_git.bb | 17 +++++++++++++++++
2 files changed, 21 insertions(+)
create mode 100644 recipes-qt/qt5/qttools/run-ptest
diff --git a/recipes-qt/qt5/qttools/run-ptest b/recipes-qt/qt5/qttools/run-ptest
new file mode 100644
index 0000000..5cd5e27
--- /dev/null
+++ b/recipes-qt/qt5/qttools/run-ptest
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+./tst_qtdiag
+./tst_qtattributionsscanner
diff --git a/recipes-qt/qt5/qttools_git.bb b/recipes-qt/qt5/qttools_git.bb
index a2b01be..5c0f51c 100644
--- a/recipes-qt/qt5/qttools_git.bb
+++ b/recipes-qt/qt5/qttools_git.bb
@@ -14,9 +14,12 @@ LIC_FILES_CHKSUM = " \
file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
"
+inherit ptest
+
DEPENDS += "qtbase qtdeclarative qtxmlpatterns"
SRC_URI += " \
+ file://run-ptest \
file://0002-assistant-help-fix-linking-of-dependent-libraries.patch \
file://0003-add-noqtwebkit-configuration.patch \
file://0004-linguist-tools-cmake-allow-overriding-the-location-f.patch \
@@ -33,3 +36,17 @@ EXTRA_QMAKEVARS_PRE += "${@bb.utils.contains('PACKAGECONFIG', 'qtwebkit', '', 'C
SRCREV = "30c10900adecca55faa1d59c2f0caac74b1f9df6"
BBCLASSEXTEND = "native nativesdk"
+
+do_compile_ptest() {
+ export PATH=${STAGING_DIR_NATIVE}/usr/include/qt5:$PATH
+ cd ${S}/tests
+ qmake -o Makefile tests.pro
+ oe_runmake
+}
+
+do_install_ptest() {
+ mkdir -p ${D}${PTEST_PATH}
+ t=${D}${PTEST_PATH}
+ cp ${S}/tests/auto/qtdiag/tst_tdiag $t
+ cp ${S}/tests/auto/qtattributionsscanner/tst_qtattributionsscanner $t
+}
--
2.7.4
More information about the Openembedded-devel
mailing list