summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-support/freerdp/freerdp/run-ptest66
-rw-r--r--meta-oe/recipes-support/freerdp/freerdp_2.6.1.bb24
2 files changed, 89 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..5a765cadf0
--- /dev/null
+++ b/meta-oe/recipes-support/freerdp/freerdp/run-ptest
@@ -0,0 +1,66 @@
1#!/bin/sh
2#These test cases were determined by running the actual test binary
3#which lists all available test cases. Couldn't find a way to just simply
4#run all. Also, BusyBox seems to have no associative array support, so
5#plain variables are used with eval.
6TestAsn="TestAsn1Module TestAsn1Encoder TestAsn1Decoder TestAsn1Encode TestAsn1Decode TestAsn1String TestAsn1Integer TestAsn1Compare TestAsn1BerEnc TestAsn1BerDec TestAsn1DerEnc TestAsn1DerDec"
7TestClient="TestClientRdpFile TestClientChannels TestClientCmdLine"
8TestClipboard="TestClipboardFormats"
9TestCommon="TestCommonAssistance"
10TestCore="TestVersion TestSettings"
11TestCredUI="TestCredUIParseUserName TestCredUIConfirmCredentials TestCredUIPromptForCredentials TestCredUICmdLinePromptForCredentials"
12TestCrt="TestTypes TestFormatSpecifiers TestAlignment TestString TestUnicodeConversion"
13TestCrypto="TestCryptoHash TestCryptoRand TestCryptoCipher TestCryptoProtectData TestCryptoProtectMemory TestCryptoCertEnumCertificatesInStore"
14TestDsParse="TestDsMakeSpn TestDsCrackNames"
15TestEnvironment="TestEnvironmentGetEnvironmentStrings TestEnvironmentSetEnvironmentVariable TestEnvironmentMergeEnvironmentStrings TestEnvironmentGetSetEB"
16TestError="TestErrorSetLastError"
17TestFile="TestFileCreateFile TestFileDeleteFile TestFileReadFile TestSetFileAttributes TestFileWriteFile TestFilePatternMatch TestFileFindFirstFile TestFileFindFirstFileEx TestFileFindNextFile TestFileGetStdHandle"
18TestFreeRDPCodec="TestFreeRDPRegion TestFreeRDPCodecMppc TestFreeRDPCodecNCrush TestFreeRDPCodecXCrush TestFreeRDPCodecZGfx TestFreeRDPCodecPlanar TestFreeRDPCodecClear TestFreeRDPCodecInterleaved TestFreeRDPCodecProgressive TestFreeRDPCodecRemoteFX"
19TestFreeRDPCrypto="TestKnownHosts TestBase64 Test_x509_cert_info"
20TestFreeRDPUtils="TestRingBuffer"
21TestGdi="TestGdiRop3 TestGdiLine TestGdiRegion TestGdiRect TestGdiBitBlt TestGdiCreate TestGdiEllipse TestGdiClip"
22TestInterlocked="TestInterlockedAccess TestInterlockedSList TestInterlockedDList"
23TestIo="TestIoDevice TestIoGetOverlappedResult"
24TestLibrary="TestLibraryLoadLibrary TestLibraryGetProcAddress TestLibraryGetModuleFileName"
25TestLocale="TestLocaleFormatMessage"
26TestMemory="TestMemoryCreateFileMapping"
27TestNt="TestNtCreateFile TestNtCurrentTeb"
28TestPath="TestPathCchAddBackslash TestPathCchRemoveBackslash TestPathCchAddBackslashEx TestPathCchRemoveBackslashEx TestPathCchAddExtension TestPathCchAppend TestPathCchAppendEx TestPathCchCanonicalize TestPathCchCanonicalizeEx TestPathAllocCanonicalize TestPathCchCombine TestPathCchCombineEx TestPathAllocCombine TestPathCchFindExtension TestPathCchRenameExtension TestPathCchRemoveExtension TestPathCchIsRoot TestPathIsUNCEx TestPathCchSkipRoot TestPathCchStripToRoot TestPathCchStripPrefix TestPathCchRemoveFileSpec TestPathShell TestPathMakePath"
29TestPipe="TestPipeCreatePipe TestPipeCreateNamedPipe TestPipeCreateNamedPipeOverlapped"
30TestPool="TestPoolIO TestPoolSynch TestPoolThread TestPoolTimer TestPoolWork"
31TestPrimitives="TestPrimitivesAdd TestPrimitivesAlphaComp TestPrimitivesAndOr TestPrimitivesColors TestPrimitivesCopy TestPrimitivesSet TestPrimitivesShift TestPrimitivesSign TestPrimitivesYUV TestPrimitivesYCbCr TestPrimitivesYCoCg"
32TestRdTk="TestRdTkNinePatch"
33TestSecurity="TestSecurityToken"
34TestSmartCard="TestSmartCardListReaders"
35TestSspi="TestQuerySecurityPackageInfo TestEnumerateSecurityPackages TestInitializeSecurityContext TestAcquireCredentialsHandle TestCredSSP TestNTLM"
36TestSynch="TestSynchInit TestSynchEvent TestSynchMutex TestSynchBarrier TestSynchCritical TestSynchSemaphore TestSynchThread TestSynchMultipleThreads TestSynchTimerQueue TestSynchWaitableTimer TestSynchWaitableTimerAPC TestSynchAPC"
37TestSysInfo="TestGetNativeSystemInfo TestCPUFeatures TestGetComputerName TestSystemTime TestLocalTime"
38TestThread="TestThreadCommandLineToArgv TestThreadCreateProcess TestThreadExitThread"
39TestWinPR="TestIntrinsics TestTypes"
40TestWinPRUtils="TestIni TestVersion TestImage TestBipBuffer TestBacktrace TestQueue TestPrint TestPubSub TestStream TestBitStream TestArrayList TestLinkedList TestListDictionary TestCmdLine TestWLog TestWLogCallback TestHashTable TestBufferPool TestStreamPool TestMessageQueue TestMessagePipe"
41TestWnd="TestWndCreateWindowEx TestWndWmCopyData"
42TestWtsApi="TestWtsApiEnumerateProcesses TestWtsApiEnumerateSessions TestWtsApiQuerySessionInformation TestWtsApiSessionNotification TestWtsApiShutdownSystem TestWtsApiWaitSystemEvent"
43
44run_test(){
45 tc=$(eval "echo \$${1}")
46 if [ -z "$tc" -o "$tc" = ".so" ]; then
47 return
48 fi
49
50 EXTRA_ARG=""
51 if [ "$1" = "TestFile" ]; then
52 # this testcase needs an extra argument
53 EXTRA_ARG="TestFileArea"
54 fi
55
56 for t in $tc; do
57 ./$1 $t $EXTRA_ARG > ../${1}_${t}.out && echo PASS: $1 $t || echo FAIL: $1 $t
58 done
59}
60
61
62cd Testing
63
64for testbin in *; do
65 run_test $testbin
66done
diff --git a/meta-oe/recipes-support/freerdp/freerdp_2.6.1.bb b/meta-oe/recipes-support/freerdp/freerdp_2.6.1.bb
index 205f7b0cd7..5122a2d057 100644
--- a/meta-oe/recipes-support/freerdp/freerdp_2.6.1.bb
+++ b/meta-oe/recipes-support/freerdp/freerdp_2.6.1.bb
@@ -8,13 +8,16 @@ SECTION = "net"
8LICENSE = "Apache-2.0" 8LICENSE = "Apache-2.0"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" 9LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
10 10
11inherit pkgconfig cmake gitpkgv 11inherit pkgconfig cmake gitpkgv ptest
12
13RDEPENDS:${PN}-ptest += "coreutils pcsc-lite-lib"
12 14
13PE = "1" 15PE = "1"
14PKGV = "${GITPKGVTAG}" 16PKGV = "${GITPKGVTAG}"
15 17
16SRCREV = "658a72980f6e93241d927c46cfa664bf2547b8b1" 18SRCREV = "658a72980f6e93241d927c46cfa664bf2547b8b1"
17SRC_URI = "git://github.com/FreeRDP/FreeRDP.git;branch=stable-2.0;protocol=https \ 19SRC_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://CVE-2022-39316.patch \ 22 file://CVE-2022-39316.patch \
20 file://CVE-2022-39318-39319.patch \ 23 file://CVE-2022-39318-39319.patch \
@@ -43,6 +46,7 @@ EXTRA_OECMAKE += " \
43 46
44PACKAGECONFIG ??= " \ 47PACKAGECONFIG ??= " \
45 ${@bb.utils.filter('DISTRO_FEATURES', 'directfb pam pulseaudio wayland x11', d)}\ 48 ${@bb.utils.filter('DISTRO_FEATURES', 'directfb pam pulseaudio wayland x11', d)}\
49 ${@bb.utils.contains('PTEST_ENABLED', '1', 'test', '', d)} \
46 gstreamer cups pcsc \ 50 gstreamer cups pcsc \
47" 51"
48 52
@@ -55,6 +59,7 @@ PACKAGECONFIG[pcsc] = "-DWITH_PCSC=ON,-DWITH_PCSC=OFF,pcsc-lite"
55PACKAGECONFIG[pulseaudio] = "-DWITH_PULSEAUDIO=ON,-DWITH_PULSEAUDIO=OFF,pulseaudio" 59PACKAGECONFIG[pulseaudio] = "-DWITH_PULSEAUDIO=ON,-DWITH_PULSEAUDIO=OFF,pulseaudio"
56PACKAGECONFIG[gstreamer] = "-DWITH_GSTREAMER_1_0=ON,-DWITH_GSTREAMER_1_0=OFF,gstreamer1.0 gstreamer1.0-plugins-base" 60PACKAGECONFIG[gstreamer] = "-DWITH_GSTREAMER_1_0=ON,-DWITH_GSTREAMER_1_0=OFF,gstreamer1.0 gstreamer1.0-plugins-base"
57PACKAGECONFIG[cups] = "-DWITH_CUPS=ON,-DWITH_CUPS=OFF,cups" 61PACKAGECONFIG[cups] = "-DWITH_CUPS=ON,-DWITH_CUPS=OFF,cups"
62PACKAGECONFIG[test] = "-DBUILD_TESTING=ON,-DBUILD_TESTING=OFF"
58 63
59PACKAGES =+ "libfreerdp" 64PACKAGES =+ "libfreerdp"
60 65
@@ -63,6 +68,14 @@ FILES:libfreerdp = "${libdir}/lib*${SOLIBS}"
63 68
64PACKAGES_DYNAMIC += "^libfreerdp-plugin-.*" 69PACKAGES_DYNAMIC += "^libfreerdp-plugin-.*"
65 70
71do_configure:prepend() {
72 if ${@bb.utils.contains('PTEST_ENABLED', '1', 'true', 'false', d)}; then
73 sed -i 's,CMAKE_CURRENT_SOURCE_DIR,"${PTEST_PATH}/test_data",' ${S}/libfreerdp/codec/test/TestFreeRDPCodecProgressive.c
74 sed -i 's,\${CMAKE_CURRENT_SOURCE_DIR},"${PTEST_PATH}/test_data",' ${S}/libfreerdp/crypto/test/CMakeLists.txt
75 sed -i 's,\${CMAKE_CURRENT_SOURCE_DIR},${PTEST_PATH}/test_data,' ${S}/winpr/libwinpr/utils/test/CMakeLists.txt
76 fi
77}
78
66# we will need winpr-makecert to generate TLS certificates 79# we will need winpr-makecert to generate TLS certificates
67do_install:append () { 80do_install:append () {
68 install -d ${D}${bindir} 81 install -d ${D}${bindir}
@@ -71,6 +84,15 @@ do_install:append () {
71 rm -rf ${D}${libdir}/freerdp 84 rm -rf ${D}${libdir}/freerdp
72} 85}
73 86
87do_install_ptest() {
88 install -d ${D}${PTEST_PATH}/test_data
89 cp -r ${B}/Testing ${D}${PTEST_PATH}
90 install -m 0644 ${S}/libfreerdp/codec/test/progressive.bmp ${D}${PTEST_PATH}/test_data/
91 install -m 0644 ${S}/libfreerdp/crypto/test/Test_x509_cert_info.pem ${D}${PTEST_PATH}/test_data/
92 install -m 0644 ${S}/winpr/libwinpr/utils/test/lodepng_32bit.png ${D}${PTEST_PATH}/test_data/
93 install -m 0644 ${S}/winpr/libwinpr/utils/test/lodepng_32bit.bmp ${D}${PTEST_PATH}/test_data/
94}
95
74python populate_packages:prepend () { 96python populate_packages:prepend () {
75 freerdp_root = d.expand('${libdir}/freerdp') 97 freerdp_root = d.expand('${libdir}/freerdp')
76 98