diff options
author | Samuli Piippo <samuli.piippo@qt.io> | 2024-01-26 15:33:21 +0000 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@qt.io> | 2024-01-29 12:49:33 +0000 |
commit | c0b9c32fbca4d801e4b9e07d896772dfd55237d6 (patch) | |
tree | d8fa619917873d1f8e60ae0c3bc48aa6c2db5580 /recipes-qt | |
parent | 20596ba439ea37f6258711e360234eef23965d93 (diff) |
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 <alex.bu@qt.io>
Diffstat (limited to 'recipes-qt')
-rw-r--r-- | recipes-qt/qt6/qt6-ptest.inc | 7 |
1 files changed, 4 insertions, 3 deletions
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() } |