-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests: USBHID: Make report test optional on Linux
This test case uses `hidapi` -- a cross-platform Python module. To keep the initial Mbed setup as simple as possible, the `hidapi` module is skipped on Linux hosts because of its external dependancies for this platform. The module can be easily installed following instructions from the README file. The test case is skipped if the host machine lacks `hidapi` module.
- Loading branch information
Filip Jagodzinski
committed
Apr 9, 2019
1 parent
111f485
commit 852390f
Showing
5 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Testing the USB HID device with a Linux host | ||
|
||
Before running `tests-usb_device-hid` test suite on a Linux machine, please | ||
make sure to install the `hidapi` Python module first, otherwise some test | ||
cases will be skipped. Due to external dependencies for Linux, this module | ||
is not installed during the initial setup, to keep the process as simple | ||
as possible. | ||
|
||
For Debian-based Linux distros, the dependencies can be installed as follows | ||
(based on module's [README][1]): | ||
|
||
```bash | ||
apt-get install python-dev libusb-1.0-0-dev libudev-dev | ||
pip install --upgrade setuptools | ||
``` | ||
To install the `hidapi` module itself, please use the attached | ||
`TESTS/usb_device/hid/requirements.txt` file: | ||
```bash | ||
pip install -r requirements.txt | ||
``` | ||
|
||
[1]: https://github.com/trezor/cython-hidapi/blob/master/README.rst#install | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
hidapi>=0.7.99,<0.8.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters