ptest: make sure sources exist

QtDeclarative is building doc snippets as part of the tests and
the sources for those are not in expected location. Test the
source directory before copying them.

Pick-to: 6.3
Change-Id: Ia3fd214dfc648d221a7b8bb6ec24e3cd3f698049
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
This commit is contained in:
Samuli Piippo 2022-01-26 16:52:26 +02:00
parent a3cf192180
commit b75a4f9dfb

View File

@ -44,7 +44,9 @@ fakeroot do_install_ptest() {
test=${f##${D}${PTEST_PATH}/}
testdir=$(dirname ${test})
# tests may depend on files from sources
cp -r ${S}/${testdir}/* ${D}${PTEST_PATH}/${testdir}
if [ -e ${S}${testdir} ]; then
cp -r ${S}/${testdir}/* ${D}${PTEST_PATH}/${testdir}
fi
echo ${test} >> ${D}${PTEST_PATH}/tst_list
done
fi