From 68956420d479edbac0a9760f91a69e751275b7e1 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Tue, 23 Aug 2022 14:01:20 +0000 Subject: 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 Signed-off-by: Martin Jansa --- recipes-qt/qt5/qt5-ptest.inc | 4 +++ ...n-t-track-the-build-or-source-directories.patch | 39 ++++++++++++---------- 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 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 - "$>" - ) - set_property(TARGET Test APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS -- QT_TESTCASE_BUILDDIR="${qt_tc_build_dir_def}" -- QT_TESTCASE_SOURCEDIR="$" -+ 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}\\\" +-) -- cgit v1.2.3