ptest: remove build paths from tests

Testlib adds references to the build and source directories to tests,
which causes warnings on buildpaths QA test. Remove those references.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-105913
Change-Id: Ic63e72a0b11bef55876ef5ca40d0c1d753243004
Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
This commit is contained in:
Samuli Piippo 2022-08-24 07:49:16 +00:00
parent ee836b7a9f
commit 3102804b65
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,28 @@
From 07f7e1ae76b24ba64cd87726c438638a8fa3eba0 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
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(-)
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

View File

@ -22,6 +22,7 @@ SRC_URI += "\
file://0001-Add-linux-oe-g-platform.patch \
file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
file://0004-Fix-qt.toolchain.cmake-for-SDK-use.patch \
file://0005-testlib-don-t-track-the-build-or-source-directories.patch \
"
DEPENDS += "\