diff options
| author | Maksym Kokhan via Openembedded-core <openembedded-core@lists.openembedded.org> | 2018-08-06 17:16:58 +0300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-09 23:47:56 +0100 |
| commit | a15cad08de6bd4aa1e311aa1c7d6e2cfd1edaeaa (patch) | |
| tree | b0aefc1fd4046ac3c5245e30ec82fe0f5aa90f9b /meta/recipes-support/libusb | |
| parent | b9aaae417a2ce1efec99a05b0357474cc206b16a (diff) | |
| download | poky-a15cad08de6bd4aa1e311aa1c7d6e2cfd1edaeaa.tar.gz | |
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>
Diffstat (limited to 'meta/recipes-support/libusb')
| -rwxr-xr-x | meta/recipes-support/libusb/libusb1/run-ptest | 15 | ||||
| -rw-r--r-- | meta/recipes-support/libusb/libusb1_1.0.22.bb | 11 |
2 files changed, 25 insertions, 1 deletions
diff --git a/meta/recipes-support/libusb/libusb1/run-ptest b/meta/recipes-support/libusb/libusb1/run-ptest new file mode 100755 index 0000000000..646a966ef9 --- /dev/null +++ b/meta/recipes-support/libusb/libusb1/run-ptest | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | echo | ||
| 4 | echo "---------------------------- libusb1 tests ---------------------------" | ||
| 5 | echo | ||
| 6 | |||
| 7 | ./stress | tr '\n' ' ' | \ | ||
| 8 | sed 's/Starting test run: \([a-zA-Z_]*\)\.\.\. \([a-zA-Z_]*\) (.) /\2 \1\n/g' | \ | ||
| 9 | sed '$d' | \ | ||
| 10 | sed '{ | ||
| 11 | s/^Success/PASS:/g | ||
| 12 | s/^Failure/FAIL:/g | ||
| 13 | s/^Error/FAIL:/g | ||
| 14 | s/^Skip/SKIP:/g | ||
| 15 | }' | ||
diff --git a/meta/recipes-support/libusb/libusb1_1.0.22.bb b/meta/recipes-support/libusb/libusb1_1.0.22.bb index 766c1c3a64..0c6e116dd7 100644 --- a/meta/recipes-support/libusb/libusb1_1.0.22.bb +++ b/meta/recipes-support/libusb/libusb1_1.0.22.bb | |||
| @@ -10,6 +10,7 @@ BBCLASSEXTEND = "native nativesdk" | |||
| 10 | 10 | ||
| 11 | SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-${PV}.tar.bz2 \ | 11 | SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-${PV}.tar.bz2 \ |
| 12 | file://no-dll.patch \ | 12 | file://no-dll.patch \ |
| 13 | file://run-ptest \ | ||
| 13 | " | 14 | " |
| 14 | 15 | ||
| 15 | SRC_URI[md5sum] = "466267889daead47674df933cea9cacb" | 16 | SRC_URI[md5sum] = "466267889daead47674df933cea9cacb" |
| @@ -17,7 +18,7 @@ SRC_URI[sha256sum] = "75aeb9d59a4fdb800d329a545c2e6799f732362193b465ea198f2aa275 | |||
| 17 | 18 | ||
| 18 | S = "${WORKDIR}/libusb-${PV}" | 19 | S = "${WORKDIR}/libusb-${PV}" |
| 19 | 20 | ||
| 20 | inherit autotools pkgconfig | 21 | inherit autotools pkgconfig ptest |
| 21 | 22 | ||
| 22 | # Don't configure udev by default since it will cause a circular | 23 | # Don't configure udev by default since it will cause a circular |
| 23 | # dependecy with udev package, which depends on libusb | 24 | # dependecy with udev package, which depends on libusb |
| @@ -30,6 +31,14 @@ do_install_append() { | |||
| 30 | fi | 31 | fi |
| 31 | } | 32 | } |
| 32 | 33 | ||
| 34 | do_compile_ptest() { | ||
| 35 | oe_runmake -C tests stress | ||
| 36 | } | ||
| 37 | |||
| 38 | do_install_ptest() { | ||
| 39 | install -m 755 ${B}/tests/.libs/stress ${D}${PTEST_PATH} | ||
| 40 | } | ||
| 41 | |||
| 33 | FILES_${PN} += "${base_libdir}/*.so.*" | 42 | FILES_${PN} += "${base_libdir}/*.so.*" |
| 34 | 43 | ||
| 35 | FILES_${PN}-dev += "${base_libdir}/*.so ${base_libdir}/*.la" | 44 | FILES_${PN}-dev += "${base_libdir}/*.so ${base_libdir}/*.la" |
