Add umockdev based tests
See https://github.com/libusb/libusb/pull/1078
This commit is contained in:
parent
36cafe8c9f
commit
e1239cc046
1038
0001-tests-Add-some-umockdev-based-tests.patch
Normal file
1038
0001-tests-Add-some-umockdev-based-tests.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -6,6 +6,7 @@ Source0: https://github.com/libusb/libusb/releases/download/v%{version}/l
|
|||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://libusb.info
|
URL: http://libusb.info
|
||||||
BuildRequires: systemd-devel doxygen libtool
|
BuildRequires: systemd-devel doxygen libtool
|
||||||
|
BuildRequires: umockdev-devel
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
# libusbx was removed in F34
|
# libusbx was removed in F34
|
||||||
@ -17,6 +18,8 @@ Obsoletes: libusbx < %{version}-%{release}
|
|||||||
Patch0001: https://github.com/libusb/libusb/pull/1058.patch
|
Patch0001: https://github.com/libusb/libusb/pull/1058.patch
|
||||||
# Fix a crash if a transfer outlives closing the device
|
# Fix a crash if a transfer outlives closing the device
|
||||||
Patch0002: https://github.com/libusb/libusb/pull/1073.patch
|
Patch0002: https://github.com/libusb/libusb/pull/1073.patch
|
||||||
|
# Add umockdev based tests from https://github.com/libusb/libusb/pull/1078
|
||||||
|
Patch0003: 0001-tests-Add-some-umockdev-based-tests.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package provides a way for applications to access USB devices.
|
This package provides a way for applications to access USB devices.
|
||||||
@ -82,6 +85,7 @@ popd
|
|||||||
%{make_install}
|
%{make_install}
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
||||||
install -m 755 tests/.libs/stress $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress
|
install -m 755 tests/.libs/stress $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress
|
||||||
|
install -m 755 tests/.libs/umockdev $RPM_BUILD_ROOT%{_bindir}/libusb-test-umockdev
|
||||||
install -m 755 examples/.libs/testlibusb \
|
install -m 755 examples/.libs/testlibusb \
|
||||||
$RPM_BUILD_ROOT%{_bindir}/libusb-test-libusb
|
$RPM_BUILD_ROOT%{_bindir}/libusb-test-libusb
|
||||||
# Some examples are very device-specific / require specific hw and miss --help
|
# Some examples are very device-specific / require specific hw and miss --help
|
||||||
@ -96,6 +100,7 @@ rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
|||||||
%check
|
%check
|
||||||
LD_LIBRARY_PATH=libusb/.libs ldd $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress
|
LD_LIBRARY_PATH=libusb/.libs ldd $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress
|
||||||
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress
|
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress
|
||||||
|
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-test-umockdev
|
||||||
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-test-libusb
|
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-test-libusb
|
||||||
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-example-listdevs
|
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-example-listdevs
|
||||||
|
|
||||||
@ -121,6 +126,7 @@ LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-example-listdevs
|
|||||||
%{_bindir}/libusb-example-listdevs
|
%{_bindir}/libusb-example-listdevs
|
||||||
%{_bindir}/libusb-example-xusb
|
%{_bindir}/libusb-example-xusb
|
||||||
%{_bindir}/libusb-test-stress
|
%{_bindir}/libusb-test-stress
|
||||||
|
%{_bindir}/libusb-test-umockdev
|
||||||
%{_bindir}/libusb-test-libusb
|
%{_bindir}/libusb-test-libusb
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,5 +4,6 @@ set -e
|
|||||||
|
|
||||||
ldd /usr/bin/libusb-test-stress
|
ldd /usr/bin/libusb-test-stress
|
||||||
/usr/bin/libusb-test-stress
|
/usr/bin/libusb-test-stress
|
||||||
|
/usr/bin/libusb-test-umockdev
|
||||||
/usr/bin/libusb-test-libusb
|
/usr/bin/libusb-test-libusb
|
||||||
/usr/bin/libusb-example-listdevs
|
/usr/bin/libusb-example-listdevs
|
||||||
|
Loading…
Reference in New Issue
Block a user