mirror of
https://github.com/thead-yocto-mirror/meta-qt5
synced 2026-06-21 08:52:35 +02:00
ptest: remove references to destination directory
Tests are build against the destination directory where qt module was just installed. This causes extra files to be taken into source package and adds references to the TMPDIR, which produces QA warnings from buildpaths QA test. Use DEBUG_PREFIX_MAP to get rid of those paths. Pick-to: 6.4 6.3 6.2 Task-number: QTBUG-105913 Change-Id: I01ed9261004410db307f2cd809a181377b734c9e Reviewed-by: Ari Parkkila <ari.parkkila@qt.io> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
committed by
Martin Jansa
parent
1ced472ce2
commit
11ef27b254
@@ -10,6 +10,10 @@ do_compile_ptest() {
|
||||
oe_runmake
|
||||
}
|
||||
|
||||
DEBUG_PREFIX_MAP += "\
|
||||
-fmacro-prefix-map=${D}= \
|
||||
"
|
||||
|
||||
fakeroot do_install_ptest() {
|
||||
mkdir -p ${D}${PTEST_PATH}
|
||||
t=${D}${PTEST_PATH}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 07f7e1ae76b24ba64cd87726c438638a8fa3eba0 Mon Sep 17 00:00:00 2001
|
||||
From 8b2ff0bb21fa447d4383aa5c749f3dcec52fe525 Mon Sep 17 00:00:00 2001
|
||||
From: Samuli Piippo <samuli.piippo@qt.io>
|
||||
Date: Mon, 22 Aug 2022 15:01:28 +0300
|
||||
Subject: [PATCH] testlib: don't track the build or source directories
|
||||
@@ -8,21 +8,24 @@ Build tests without location of the build and sources directories.
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
Change-Id: I8d5add473623a3d9f481097649819c9fb906e4b2
|
||||
---
|
||||
src/testlib/CMakeLists.txt | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
mkspecs/features/testlib_defines.prf | 2 --
|
||||
src/testlib/Qt5TestConfigExtras.cmake.in | 5 -----
|
||||
2 files changed, 7 deletions(-)
|
||||
|
||||
diff --git a/src/testlib/CMakeLists.txt b/src/testlib/CMakeLists.txt
|
||||
index 03deb2edc9..972b366532 100644
|
||||
--- a/src/testlib/CMakeLists.txt
|
||||
+++ b/src/testlib/CMakeLists.txt
|
||||
@@ -125,8 +125,8 @@ set(qt_tc_build_dir_def
|
||||
"$<IF:${qt_bool_tc_build_dir},${qt_tc_build_dir},$<TARGET_PROPERTY:BINARY_DIR>>"
|
||||
)
|
||||
set_property(TARGET Test APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS
|
||||
- QT_TESTCASE_BUILDDIR="${qt_tc_build_dir_def}"
|
||||
- QT_TESTCASE_SOURCEDIR="$<TARGET_PROPERTY:SOURCE_DIR>"
|
||||
+ QT_TESTCASE_BUILDDIR=""
|
||||
+ QT_TESTCASE_SOURCEDIR=""
|
||||
)
|
||||
|
||||
# special case begin
|
||||
diff --git a/mkspecs/features/testlib_defines.prf b/mkspecs/features/testlib_defines.prf
|
||||
index 901e03a91d..e69de29bb2 100644
|
||||
--- a/mkspecs/features/testlib_defines.prf
|
||||
+++ b/mkspecs/features/testlib_defines.prf
|
||||
@@ -1,2 +0,0 @@
|
||||
-contains(TEMPLATE, vc.*): DEFINES += QT_TESTCASE_BUILDDIR=\"$$OUT_PWD\"
|
||||
-else: DEFINES += QT_TESTCASE_BUILDDIR=$$shell_quote(\"$$OUT_PWD\")
|
||||
diff --git a/src/testlib/Qt5TestConfigExtras.cmake.in b/src/testlib/Qt5TestConfigExtras.cmake.in
|
||||
index 2a575958ae..e69de29bb2 100644
|
||||
--- a/src/testlib/Qt5TestConfigExtras.cmake.in
|
||||
+++ b/src/testlib/Qt5TestConfigExtras.cmake.in
|
||||
@@ -1,5 +0,0 @@
|
||||
-
|
||||
-set_property(TARGET Qt5::Test
|
||||
- APPEND PROPERTY
|
||||
- INTERFACE_COMPILE_DEFINITIONS QT_TESTCASE_BUILDDIR=\\\"\${CMAKE_BINARY_DIR}\\\"
|
||||
-)
|
||||
|
||||
Reference in New Issue
Block a user