mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 17:19:20 +00:00
libusb: Add ptest
The run-ptest script was added to run existing libusb1 tests and libusb1 recipe was changed to add ptest support to that package. (From OE-Core rev: 3f0106bf2e41197def3bf0a5b184b73a9802fb91) Signed-off-by: Maksym Kokhan <maksym.kokhan@globallogic.com> Reviewed-by: Andrii Bordunov <andrii.bordunov@globallogic.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
b9aaae417a
commit
a15cad08de
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo
|
||||
echo "---------------------------- libusb1 tests ---------------------------"
|
||||
echo
|
||||
|
||||
./stress | tr '\n' ' ' | \
|
||||
sed 's/Starting test run: \([a-zA-Z_]*\)\.\.\. \([a-zA-Z_]*\) (.) /\2 \1\n/g' | \
|
||||
sed '$d' | \
|
||||
sed '{
|
||||
s/^Success/PASS:/g
|
||||
s/^Failure/FAIL:/g
|
||||
s/^Error/FAIL:/g
|
||||
s/^Skip/SKIP:/g
|
||||
}'
|
||||
@@ -10,6 +10,7 @@ BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-${PV}.tar.bz2 \
|
||||
file://no-dll.patch \
|
||||
file://run-ptest \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "466267889daead47674df933cea9cacb"
|
||||
@@ -17,7 +18,7 @@ SRC_URI[sha256sum] = "75aeb9d59a4fdb800d329a545c2e6799f732362193b465ea198f2aa275
|
||||
|
||||
S = "${WORKDIR}/libusb-${PV}"
|
||||
|
||||
inherit autotools pkgconfig
|
||||
inherit autotools pkgconfig ptest
|
||||
|
||||
# Don't configure udev by default since it will cause a circular
|
||||
# dependecy with udev package, which depends on libusb
|
||||
@@ -30,6 +31,14 @@ do_install_append() {
|
||||
fi
|
||||
}
|
||||
|
||||
do_compile_ptest() {
|
||||
oe_runmake -C tests stress
|
||||
}
|
||||
|
||||
do_install_ptest() {
|
||||
install -m 755 ${B}/tests/.libs/stress ${D}${PTEST_PATH}
|
||||
}
|
||||
|
||||
FILES_${PN} += "${base_libdir}/*.so.*"
|
||||
|
||||
FILES_${PN}-dev += "${base_libdir}/*.so ${base_libdir}/*.la"
|
||||
|
||||
Reference in New Issue
Block a user