Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/tools/testing/selftests/hid/run-hid-tools-tests.sh
26302 views
1
#!/bin/sh
2
# SPDX-License-Identifier: GPL-2.0
3
# Runs tests for the HID subsystem
4
5
KSELFTEST_SKIP_TEST=4
6
7
if ! command -v python3 > /dev/null 2>&1; then
8
echo "hid-tools: [SKIP] python3 not installed"
9
exit $KSELFTEST_SKIP_TEST
10
fi
11
12
if ! python3 -c "import pytest" > /dev/null 2>&1; then
13
echo "hid: [SKIP] pytest module not installed"
14
exit $KSELFTEST_SKIP_TEST
15
fi
16
17
if ! python3 -c "import pytest_tap" > /dev/null 2>&1; then
18
echo "hid: [SKIP] pytest_tap module not installed"
19
exit $KSELFTEST_SKIP_TEST
20
fi
21
22
if ! python3 -c "import hidtools" > /dev/null 2>&1; then
23
echo "hid: [SKIP] hid-tools module not installed"
24
exit $KSELFTEST_SKIP_TEST
25
fi
26
27
TARGET=${TARGET:=.}
28
29
echo TAP version 13
30
python3 -u -m pytest $PYTEST_XDIST ./tests/$TARGET --tap-stream --udevd
31
32