[meta-oe][PATCH 6/9] freerdp3: install cmdline-tests data for ptest

Khem Raj <[email protected]>
Newsgroups org.openembedded.lists.openembedded-devel
Message-ID <[email protected]>
From: Khem Raj <[email protected]>

TestCommandLineToCommaSeparatedValues fails because its JSON test cases
are never installed.

With no arguments the test runs runJsonTests(), which globs
TEST_SOURCE_DIR/cmdline-tests/*.json via FindFirstFileA and returns -1
when the directory cannot be opened. do_configure:prepend already
rewrites TEST_SOURCE_DIR for this CMakeLists to ${PTEST_PATH}/test, and
the built driver confirms it:

  $ strings Testing/TestWinPRUtils | grep -e cmdline-tests -e ptest/test
  cmdline-tests
  cmdline-tests%c*.json
  /usr/lib/freerdp3/ptest/test

but do_install_ptest only copies *bmp out of
winpr/libwinpr/utils/test, so /usr/lib/freerdp3/ptest/test/cmdline-tests
does not exist on target and the glob always fails. Copy the directory
alongside the other test data.

Signed-off-by: Khem Raj <[email protected]>
---
 meta-oe/recipes-support/freerdp/freerdp3_3.30.0.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta-oe/recipes-support/freerdp/freerdp3_3.30.0.bb b/meta-oe/recipes-support/freerdp/freerdp3_3.30.0.bb
index 7d78f770f7..c839f7b7a1 100644
--- a/meta-oe/recipes-support/freerdp/freerdp3_3.30.0.bb
+++ b/meta-oe/recipes-support/freerdp/freerdp3_3.30.0.bb
@@ -86,6 +86,7 @@ do_install_ptest() {
     cp -r ${B}/Testing ${D}${PTEST_PATH}
     # test data
     cp ${S}/winpr/libwinpr/utils/test/*bmp ${D}${PTEST_PATH}/test/
+    cp -r ${S}/winpr/libwinpr/utils/test/cmdline-tests ${D}${PTEST_PATH}/test/
     cp ${S}/libfreerdp/codec/test/*bmp ${D}${PTEST_PATH}/test/
     cp -r ${S}/client/common/test/* ${D}${PTEST_PATH}/test/
     cp -r ${S}/resources ${D}${PTEST_PATH}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.