aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qt5-ptest.inc
Commit message (Collapse)AuthorAgeFilesLines
* qt5: refactor ptestSamuli Piippo2018-02-021-46/+5
| | | | | | | | | | | Current implementation was causing build issues since it cluttered source directories and modified recipe sysroot content. Tests are now built in the separate build directory ${B} where we don't need to worry about moving files to the recipe sysroot, and if tests are enabled in PACKAGECONFIG, they have been already built during do_compile. Change-Id: I8af72b0c79b3668511547dfde0fed0e3e10f2185 Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
* qt5-ptest.inc: fix qtxmlpatterns:do_install_ptest out-of-order callDenys Dmytriyenko2017-10-271-2/+3
| | | | | | | | | | | | | | | | | | ptest.bbclass provides a set of standard do_*_ptest_base tasks. Each of them calls a corresponding regular do_*_ptest task, that components are supposed to override for own implementation. When PTEST_ENABLED is not set, an anonymous python function removes all do_*_ptest_base tasks from the queue. qt5-ptest.inc adds a special case for do_populate_sysroot and re-arranges the order or ptest tasks due to that. But, unfortunately, do_install_ptest was added directly, not do_install_ptest_base, hence when "ptest" is disabled and all other do_*_ptest_base tasks are removed, this one do_install_ptest task is left w/o dependencies and gets scheduled for execution very early on, even before pseudo-native gets built and stages "fakeroot" functionality. The fix is to add do_install_ptest_base task, which calls do_install_ptest only when "ptest" is enabled. Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* qt5-ptest: fix build with yocto < 2.3 (pyro)Luca Ceresoli2017-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The expand parameter to DataSmart.getVar() defaults to True since yocto 2.3 (pyro) [0]. Stable Yocto releases 2.2 (morty) and 2.1 (krogoth) had no default value. Older, now unsupported releases defaulted to False [1] [2]. Not passing the expand parameter here means all recipes including qt5-ptest.inc won't build with yocto 2.2 and 2.1 with this error message: $ bitbake qtxmlpatterns -vfc populate_sysroot [...] ERROR: Error executing a python function in exec_python_func() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:do_populate_sysroot(d) 0003: File: '[...]/poky/meta/classes/staging.bbclass', lineno: 227, function: do_populate_sysroot 0223: p = p.replace("/", "_") 0224: with open(provdir + p, "w") as f: 0225: f.write(pn) 0226:} *** 0227: 0228:do_populate_sysroot[vardeps] += "${SYSROOT_PREPROCESS_FUNCS}" 0229:do_populate_sysroot[vardepsexclude] += "MULTI_PROVIDER_WHITELIST" 0230: 0231:SSTATETASKS += "do_populate_sysroot" Exception: TypeError: getVar() missing 1 required positional argument: 'expand' DEBUG: Python function do_populate_sysroot finished ERROR: Function failed: do_populate_sysroot Fixing this in a user layer requires duplicating the entire do_populate_sysroot_append() in the .bbappend of all packages including qt5-ptest.inc, i.e. currently qtdeclarative, qtquick1 and qtxmlpatterns. Avoid the hassle for those users by explicitly passing expand=True. [0] http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=2631c375b8a025ee2e4329f6d93900bb7b5dadf7 [1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=c7610aa353e31977c099ce574acb188a3f4219e0 [2] http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=4e5e501155a21fe64a470c626b3afe6d9748308e Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* qt5-ptest.inc: append do_populate_sysroot only for targetMartin Jansa2017-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * otherwise it breaks e.g. qtxmlpatterns-native build as shown in: http://errors.yoctoproject.org/Errors/Details/147039/ ERROR: Error executing a python function in exec_python_func() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:do_populate_sysroot(d) 0003: File: 'TOPDIR/openembedded-core/meta/classes/staging.bbclass', lineno: 128, function: do_populate_sysroot 0124: 0125:python do_populate_sysroot_setscene () { 0126: sstate_setscene(d) 0127:} *** 0128:addtask do_populate_sysroot_setscene 0129: 0130:def staging_copyfile(c, target, dest, postinsts, seendirs): 0131: import errno 0132: File: 'TOPDIR/openembedded-core/meta/classes/staging.bbclass', lineno: 114, function: copyFiles 0110: 0111:do_populate_sysroot[vardeps] += "${SYSROOT_PREPROCESS_FUNCS}" 0112:do_populate_sysroot[vardepsexclude] += "MULTI_PROVIDER_WHITELIST" 0113: *** 0114:POPULATESYSROOTDEPS = "" 0115:POPULATESYSROOTDEPS_class-target = "virtual/${MLPREFIX}${TARGET_PREFIX}binutils:do_populate_sysroot" 0116:POPULATESYSROOTDEPS_class-nativesdk = "virtual/${TARGET_PREFIX}binutils-crosssdk:do_populate_sysroot" 0117:do_populate_sysroot[depends] += "${POPULATESYSROOTDEPS}" 0118: Exception: FileNotFoundError: [Errno 2] No such file or directory: 'TOPDIR/tmp-glibc/work/x86_64-linux/qtxmlpatterns-native/5.8.0+gitAUTOINC+9f7e01b582-r0/sysroot-destdir/usr/' Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* qt5: add qt5-ptest.incHuang Qiyu2017-07-121-0/+62
Add qt5-ptest.inc file for qt ptest related tasks 1) Rewrite do_compile_ptest task for qt 2) Add new do_compile_ptest_base and task do_install_ptest 3) Write do_populate_sysroot_append to resolve do_compile_ptest_base problem in yocto2.3 The compile error log is shown as follow: cd auto/ && ( test -e Makefile || /yocto/work001/fnst/huangqy/work_qt/build/tmp/work/i586-p oky-linux/qtxmlpatterns/5.8.0+gitAUTOINC+9f7e01b582-r0/recipe-sysroot-native/usr/bin/qt5/qmake -o M akefile /yocto/work001/fnst/huangqy/work_qt/build/tmp/work/i586-poky-linux/qtxmlpatterns/5.8.0+gitA UTOINC+9f7e01b582-r0/git/tests/auto/auto.pro ) && make -f Makefile Project ERROR: Could not find feature xml-schema. Makefile:42: recipe for target 'sub-auto-make_first' failed Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>