Path: blob/master/tools/testing/selftests/hid/run-hid-tools-tests.sh
26302 views
#!/bin/sh1# SPDX-License-Identifier: GPL-2.02# Runs tests for the HID subsystem34KSELFTEST_SKIP_TEST=456if ! command -v python3 > /dev/null 2>&1; then7echo "hid-tools: [SKIP] python3 not installed"8exit $KSELFTEST_SKIP_TEST9fi1011if ! python3 -c "import pytest" > /dev/null 2>&1; then12echo "hid: [SKIP] pytest module not installed"13exit $KSELFTEST_SKIP_TEST14fi1516if ! python3 -c "import pytest_tap" > /dev/null 2>&1; then17echo "hid: [SKIP] pytest_tap module not installed"18exit $KSELFTEST_SKIP_TEST19fi2021if ! python3 -c "import hidtools" > /dev/null 2>&1; then22echo "hid: [SKIP] hid-tools module not installed"23exit $KSELFTEST_SKIP_TEST24fi2526TARGET=${TARGET:=.}2728echo TAP version 1329python3 -u -m pytest $PYTEST_XDIST ./tests/$TARGET --tap-stream --udevd303132