From c0b9c32fbca4d801e4b9e07d896772dfd55237d6 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Fri, 26 Jan 2024 15:33:21 +0000 Subject: ptest: skip non-existing tests ctest might list tests that don't have executable, such as QMLTESTs, that are run with qmltestrunner. Skip these tests. Pick-to: 6.7 6.6 Fixes: WEBOSCI-62 Change-Id: If8e3ce657d86469b8a83a05146e6698b8c5452d3 Reviewed-by: Alex Bu --- recipes-qt/qt6/qt6-ptest.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'recipes-qt') diff --git a/recipes-qt/qt6/qt6-ptest.inc b/recipes-qt/qt6/qt6-ptest.inc index 30833f6..573fc58 100644 --- a/recipes-qt/qt6/qt6-ptest.inc +++ b/recipes-qt/qt6/qt6-ptest.inc @@ -73,9 +73,10 @@ fakeroot python do_create_ptest_list() { test_name = test.get('name') working_directory = next((prop['value'] for prop in test.get('properties', []) if prop['name'] == 'WORKING_DIRECTORY'), None) - if test_name and working_directory: - test_executable = os.path.normpath(os.path.join(working_directory,test_name)).replace(builddir,ptest_path) - file.write(f'{test_executable}\n') + test_executable = os.path.normpath(os.path.join(working_directory,test_name)) + if test_executable.startswith(builddir) and os.path.isfile(test_executable): + test_executable = test_executable.replace(builddir,ptest_path) + file.write(f'{test_executable}\n') file.close() } -- cgit v1.2.3