diff options
| author | Gyorgy Sarvari <skandigraun@gmail.com> | 2026-01-22 14:12:25 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2026-01-22 22:01:05 -0800 |
| commit | 7c65b0bccbd17f1d5b56235e008f0d6a0f00aa06 (patch) | |
| tree | d7a42836ff750ccd103eeb8c8676de29b2687381 /meta-oe/recipes-support/freerdp | |
| parent | b7bd06e9b4ff1bf55b5ba8943c2547ec8ff6dba7 (diff) | |
| download | meta-openembedded-7c65b0bccbd17f1d5b56235e008f0d6a0f00aa06.tar.gz | |
freerdp: add ptest support
The test suite takes about 50s to execute.
Sample output:
root@qemux86-64:~# ptest-runner
START: ptest-runner
2026-01-22T12:58
BEGIN: /usr/lib/freerdp/ptest
PASS: TestClient TestClientRdpFile
PASS: TestClient TestClientChannels
PASS: TestClient TestClientCmdLine
[...many lines...]
PASS: TestWtsApi TestWtsApiSessionNotification
PASS: TestWtsApi TestWtsApiShutdownSystem
PASS: TestWtsApi TestWtsApiWaitSystemEvent
DURATION: 48
END: /usr/lib/freerdp/ptest
2026-01-22T12:59
STOP: ptest-runner
TOTAL: 1 FAIL: 0
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/freerdp')
| -rw-r--r-- | meta-oe/recipes-support/freerdp/freerdp/run-ptest | 85 | ||||
| -rw-r--r-- | meta-oe/recipes-support/freerdp/freerdp_2.11.7.bb | 22 |
2 files changed, 106 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/freerdp/freerdp/run-ptest b/meta-oe/recipes-support/freerdp/freerdp/run-ptest new file mode 100644 index 0000000000..423a780eb1 --- /dev/null +++ b/meta-oe/recipes-support/freerdp/freerdp/run-ptest | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | #The key is the test binary name, and the value is the list of arguments to | ||
| 4 | #use with the given binary. Each argument is a testcase to execute. | ||
| 5 | |||
| 6 | #These test cases were determined by running the actual test binary | ||
| 7 | #which lists all available test cases. Couldn't find a way to just simply | ||
| 8 | #run all. Also, BusyBox seems to have no associative array support, so | ||
| 9 | #plain variables are used with eval. | ||
| 10 | |||
| 11 | TestAsn="TestAsn1Module TestAsn1Encoder TestAsn1Decoder TestAsn1Encode TestAsn1Decode TestAsn1String \ | ||
| 12 | TestAsn1Integer TestAsn1Compare TestAsn1BerEnc TestAsn1BerDec TestAsn1DerEnc TestAsn1DerDec" | ||
| 13 | TestClient="TestClientRdpFile TestClientChannels TestClientCmdLine" | ||
| 14 | TestClipboard="TestClipboardFormats" | ||
| 15 | TestCommon="TestCommonAssistance" | ||
| 16 | TestCore="TestVersion TestSettings" | ||
| 17 | TestCredUI="TestCredUIParseUserName TestCredUIConfirmCredentials TestCredUIPromptForCredentials TestCredUICmdLinePromptForCredentials" | ||
| 18 | TestCrt="TestTypes TestFormatSpecifiers TestAlignment TestString TestUnicodeConversion" | ||
| 19 | TestCrypto="TestCryptoHash TestCryptoRand TestCryptoCipher TestCryptoProtectData TestCryptoProtectMemory TestCryptoCertEnumCertificatesInStore" | ||
| 20 | TestDsParse="TestDsMakeSpn TestDsCrackNames" | ||
| 21 | TestEnvironment="TestEnvironmentGetEnvironmentStrings TestEnvironmentSetEnvironmentVariable TestEnvironmentMergeEnvironmentStrings TestEnvironmentGetSetEB" | ||
| 22 | TestError="TestErrorSetLastError" | ||
| 23 | TestFile="TestFileCreateFile TestFileDeleteFile TestFileReadFile TestSetFileAttributes TestFileWriteFile \ | ||
| 24 | TestFilePatternMatch TestFileFindFirstFile TestFileFindFirstFileEx TestFileFindNextFile TestFileGetStdHandle" | ||
| 25 | TestFreeRDPCodec="TestFreeRDPRegion TestFreeRDPCodecMppc TestFreeRDPCodecNCrush TestFreeRDPCodecXCrush \ | ||
| 26 | TestFreeRDPCodecZGfx TestFreeRDPCodecPlanar TestFreeRDPCodecClear TestFreeRDPCodecInterleaved \ | ||
| 27 | TestFreeRDPCodecProgressive TestFreeRDPCodecRemoteFX" | ||
| 28 | TestFreeRDPCrypto="TestKnownHosts TestBase64 Test_x509_cert_info" | ||
| 29 | TestFreeRDPUtils="TestRingBuffer" | ||
| 30 | TestGdi="TestGdiRop3 TestGdiLine TestGdiRegion TestGdiRect TestGdiBitBlt TestGdiCreate TestGdiEllipse TestGdiClip" | ||
| 31 | TestInterlocked="TestInterlockedAccess TestInterlockedSList TestInterlockedDList" | ||
| 32 | TestIo="TestIoDevice TestIoGetOverlappedResult" | ||
| 33 | TestLibrary="TestLibraryLoadLibrary TestLibraryGetProcAddress TestLibraryGetModuleFileName" | ||
| 34 | TestLocale="TestLocaleFormatMessage" | ||
| 35 | TestMemory="TestMemoryCreateFileMapping" | ||
| 36 | TestNt="TestNtCreateFile TestNtCurrentTeb" | ||
| 37 | TestPath="TestPathCchAddBackslash TestPathCchRemoveBackslash TestPathCchAddBackslashEx TestPathCchRemoveBackslashEx \ | ||
| 38 | TestPathCchAddExtension TestPathCchAppend TestPathCchAppendEx TestPathCchCanonicalize TestPathCchCanonicalizeEx \ | ||
| 39 | TestPathAllocCanonicalize TestPathCchCombine TestPathCchCombineEx TestPathAllocCombine TestPathCchFindExtension \ | ||
| 40 | TestPathCchRenameExtension TestPathCchRemoveExtension TestPathCchIsRoot TestPathIsUNCEx TestPathCchSkipRoot \ | ||
| 41 | TestPathCchStripToRoot TestPathCchStripPrefix TestPathCchRemoveFileSpec TestPathShell TestPathMakePath" | ||
| 42 | TestPipe="TestPipeCreatePipe TestPipeCreateNamedPipe TestPipeCreateNamedPipeOverlapped" | ||
| 43 | TestPool="TestPoolIO TestPoolSynch TestPoolThread TestPoolTimer TestPoolWork" | ||
| 44 | TestPrimitives="TestPrimitivesAdd TestPrimitivesAlphaComp TestPrimitivesAndOr TestPrimitivesColors TestPrimitivesCopy \ | ||
| 45 | TestPrimitivesSet TestPrimitivesShift TestPrimitivesSign TestPrimitivesYUV TestPrimitivesYCbCr TestPrimitivesYCoCg" | ||
| 46 | TestRdTk="TestRdTkNinePatch" | ||
| 47 | TestSecurity="TestSecurityToken" | ||
| 48 | TestSmartCard="TestSmartCardListReaders" | ||
| 49 | TestSspi="TestQuerySecurityPackageInfo TestEnumerateSecurityPackages TestInitializeSecurityContext TestAcquireCredentialsHandle TestCredSSP TestNTLM" | ||
| 50 | TestSynch="TestSynchInit TestSynchEvent TestSynchMutex TestSynchBarrier TestSynchCritical TestSynchSemaphore \ | ||
| 51 | TestSynchThread TestSynchMultipleThreads TestSynchTimerQueue TestSynchWaitableTimer TestSynchWaitableTimerAPC TestSynchAPC" | ||
| 52 | TestSysInfo="TestGetNativeSystemInfo TestCPUFeatures TestGetComputerName TestSystemTime TestLocalTime" | ||
| 53 | TestThread="TestThreadCommandLineToArgv TestThreadCreateProcess TestThreadExitThread" | ||
| 54 | TestWinPR="TestIntrinsics TestTypes" | ||
| 55 | TestWinPRUtils="TestIni TestVersion TestImage TestBipBuffer TestBacktrace TestQueue TestPrint TestPubSub TestStream \ | ||
| 56 | TestBitStream TestArrayList TestLinkedList TestListDictionary TestCmdLine TestWLog TestWLogCallback TestHashTable \ | ||
| 57 | TestBufferPool TestStreamPool TestMessageQueue TestMessagePipe" | ||
| 58 | TestWnd="TestWndCreateWindowEx TestWndWmCopyData" | ||
| 59 | TestWtsApi="TestWtsApiEnumerateProcesses TestWtsApiEnumerateSessions TestWtsApiQuerySessionInformation \ | ||
| 60 | TestWtsApiSessionNotification TestWtsApiShutdownSystem TestWtsApiWaitSystemEvent" | ||
| 61 | |||
| 62 | run_test(){ | ||
| 63 | binary=$1 | ||
| 64 | tcs=$(eval "echo \$${binary}") | ||
| 65 | if [ -z "$tcs" -o "$tcs" = ".so" ]; then | ||
| 66 | return | ||
| 67 | fi | ||
| 68 | |||
| 69 | EXTRA_ARG="" | ||
| 70 | if [ "$binary" = "TestFile" ]; then | ||
| 71 | # This testcase needs an extra argument. TestFileArea is a folder | ||
| 72 | # where some test files are used by this test. | ||
| 73 | EXTRA_ARG="TestFileArea" | ||
| 74 | fi | ||
| 75 | |||
| 76 | for tc in $tcs; do | ||
| 77 | ./$binary $tc $EXTRA_ARG > ../${binary}_${tc}.out 2>&1 && echo PASS: $binary $tc || echo FAIL: $binary $tc | ||
| 78 | done | ||
| 79 | } | ||
| 80 | |||
| 81 | cd Testing | ||
| 82 | |||
| 83 | for testbin in *; do | ||
| 84 | run_test $testbin | ||
| 85 | done | ||
diff --git a/meta-oe/recipes-support/freerdp/freerdp_2.11.7.bb b/meta-oe/recipes-support/freerdp/freerdp_2.11.7.bb index a78724b925..50a1de8299 100644 --- a/meta-oe/recipes-support/freerdp/freerdp_2.11.7.bb +++ b/meta-oe/recipes-support/freerdp/freerdp_2.11.7.bb | |||
| @@ -8,13 +8,16 @@ SECTION = "net" | |||
| 8 | LICENSE = "Apache-2.0" | 8 | LICENSE = "Apache-2.0" |
| 9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" | 9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" |
| 10 | 10 | ||
| 11 | inherit pkgconfig cmake gitpkgv | 11 | inherit pkgconfig cmake gitpkgv ptest |
| 12 | |||
| 13 | RDEPENDS:${PN}-ptest += "coreutils pcsc-lite-lib" | ||
| 12 | 14 | ||
| 13 | PE = "1" | 15 | PE = "1" |
| 14 | PKGV = "${GITPKGVTAG}" | 16 | PKGV = "${GITPKGVTAG}" |
| 15 | 17 | ||
| 16 | SRCREV = "efa899d3deb8595a29fabb2a2251722f9d7e0d7f" | 18 | SRCREV = "efa899d3deb8595a29fabb2a2251722f9d7e0d7f" |
| 17 | SRC_URI = "git://github.com/FreeRDP/FreeRDP.git;branch=stable-2.0;protocol=https \ | 19 | SRC_URI = "git://github.com/FreeRDP/FreeRDP.git;branch=stable-2.0;protocol=https \ |
| 20 | file://run-ptest \ | ||
| 18 | file://winpr-makecert-Build-with-install-RPATH.patch \ | 21 | file://winpr-makecert-Build-with-install-RPATH.patch \ |
| 19 | file://0001-Fixed-compilation-warnings.patch \ | 22 | file://0001-Fixed-compilation-warnings.patch \ |
| 20 | file://0001-Fix-const-qualifier-error.patch \ | 23 | file://0001-Fix-const-qualifier-error.patch \ |
| @@ -37,6 +40,7 @@ EXTRA_OECMAKE += " \ | |||
| 37 | 40 | ||
| 38 | PACKAGECONFIG ??= " \ | 41 | PACKAGECONFIG ??= " \ |
| 39 | ${@bb.utils.filter('DISTRO_FEATURES', 'directfb pam pulseaudio wayland x11', d)}\ | 42 | ${@bb.utils.filter('DISTRO_FEATURES', 'directfb pam pulseaudio wayland x11', d)}\ |
| 43 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'test', '', d)} \ | ||
| 40 | alsa gstreamer cups pcsc server \ | 44 | alsa gstreamer cups pcsc server \ |
| 41 | " | 45 | " |
| 42 | 46 | ||
| @@ -51,6 +55,7 @@ PACKAGECONFIG[gstreamer] = "-DWITH_GSTREAMER_1_0=ON,-DWITH_GSTREAMER_1_0=OFF,gst | |||
| 51 | PACKAGECONFIG[cups] = "-DWITH_CUPS=ON,-DWITH_CUPS=OFF,cups" | 55 | PACKAGECONFIG[cups] = "-DWITH_CUPS=ON,-DWITH_CUPS=OFF,cups" |
| 52 | PACKAGECONFIG[server] = "-DWITH_SERVER=ON,-DWITH_SERVER=OFF" | 56 | PACKAGECONFIG[server] = "-DWITH_SERVER=ON,-DWITH_SERVER=OFF" |
| 53 | PACKAGECONFIG[alsa] = "-DWITH_ALSA=ON,-DWITH_ALSA=OFF,alsa-lib" | 57 | PACKAGECONFIG[alsa] = "-DWITH_ALSA=ON,-DWITH_ALSA=OFF,alsa-lib" |
| 58 | PACKAGECONFIG[test] = "-DBUILD_TESTING=ON,-DBUILD_TESTING=OFF" | ||
| 54 | 59 | ||
| 55 | PACKAGES =+ "libfreerdp" | 60 | PACKAGES =+ "libfreerdp" |
| 56 | 61 | ||
| @@ -59,6 +64,12 @@ FILES:libfreerdp = "${libdir}/lib*${SOLIBS}" | |||
| 59 | 64 | ||
| 60 | PACKAGES_DYNAMIC += "^libfreerdp-plugin-.*" | 65 | PACKAGES_DYNAMIC += "^libfreerdp-plugin-.*" |
| 61 | 66 | ||
| 67 | do_configure:prepend() { | ||
| 68 | sed -i 's,CMAKE_CURRENT_SOURCE_DIR,"${PTEST_PATH}/test_data",' ${S}/libfreerdp/codec/test/TestFreeRDPCodecProgressive.c | ||
| 69 | sed -i 's,\${CMAKE_CURRENT_SOURCE_DIR},"${PTEST_PATH}/test_data",' ${S}/libfreerdp/crypto/test/CMakeLists.txt | ||
| 70 | sed -i 's,\${CMAKE_CURRENT_SOURCE_DIR},${PTEST_PATH}/test_data,' ${S}/winpr/libwinpr/utils/test/CMakeLists.txt | ||
| 71 | } | ||
| 72 | |||
| 62 | do_configure:append() { | 73 | do_configure:append() { |
| 63 | sed -i -e 's|${WORKDIR}||g' ${B}/buildflags.h | 74 | sed -i -e 's|${WORKDIR}||g' ${B}/buildflags.h |
| 64 | } | 75 | } |
| @@ -70,6 +81,15 @@ do_install:append () { | |||
| 70 | rm -rf ${D}${libdir}/freerdp | 81 | rm -rf ${D}${libdir}/freerdp |
| 71 | } | 82 | } |
| 72 | 83 | ||
| 84 | do_install_ptest() { | ||
| 85 | install -d ${D}${PTEST_PATH}/test_data | ||
| 86 | cp -r ${B}/Testing ${D}${PTEST_PATH} | ||
| 87 | install -m 0644 ${S}/libfreerdp/codec/test/progressive.bmp ${D}${PTEST_PATH}/test_data/ | ||
| 88 | install -m 0644 ${S}/libfreerdp/crypto/test/Test_x509_cert_info.pem ${D}${PTEST_PATH}/test_data/ | ||
| 89 | install -m 0644 ${S}/winpr/libwinpr/utils/test/lodepng_32bit.png ${D}${PTEST_PATH}/test_data/ | ||
| 90 | install -m 0644 ${S}/winpr/libwinpr/utils/test/lodepng_32bit.bmp ${D}${PTEST_PATH}/test_data/ | ||
| 91 | } | ||
| 92 | |||
| 73 | python populate_packages:prepend () { | 93 | python populate_packages:prepend () { |
| 74 | freerdp_root = d.expand('${libdir}/freerdp') | 94 | freerdp_root = d.expand('${libdir}/freerdp') |
| 75 | 95 | ||
