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