aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2022-08-23 14:01:20 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2022-09-19 15:18:46 +0200
commit68956420d479edbac0a9760f91a69e751275b7e1 (patch)
treedd2669078bc5bb8747ff8cff4f707fbf9e2a1b9a
parente7cbd04f349b28e49b9b4e040f707ad308a62a3e (diff)
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>
-rw-r--r--recipes-qt/qt5/qt5-ptest.inc4
-rw-r--r--recipes-qt/qt5/qtbase/0005-testlib-don-t-track-the-build-or-source-directories.patch39
2 files changed, 25 insertions, 18 deletions
diff --git a/recipes-qt/qt5/qt5-ptest.inc b/recipes-qt/qt5/qt5-ptest.inc
index c96714a4..75d71ba9 100644
--- a/recipes-qt/qt5/qt5-ptest.inc
+++ b/recipes-qt/qt5/qt5-ptest.inc
@@ -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}
diff --git a/recipes-qt/qt5/qtbase/0005-testlib-don-t-track-the-build-or-source-directories.patch b/recipes-qt/qt5/qtbase/0005-testlib-don-t-track-the-build-or-source-directories.patch
index ec8bd4aa..d6715460 100644
--- a/recipes-qt/qt5/qtbase/0005-testlib-don-t-track-the-build-or-source-directories.patch
+++ b/recipes-qt/qt5/qtbase/0005-testlib-don-t-track-the-build-or-source-directories.patch
@@ -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}\\\"
+-)