sdsi.sh 550 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. # SPDX-License-Identifier: GPL-2.0
  3. # Runs tests for the intel_sdsi driver
  4. if ! command -v python3 > /dev/null 2>&1; then
  5. echo "drivers/sdsi: [SKIP] python3 not installed"
  6. exit 77
  7. fi
  8. if ! python3 -c "import pytest" > /dev/null 2>&1; then
  9. echo "drivers/sdsi: [SKIP] pytest module not installed"
  10. exit 77
  11. fi
  12. if ! /sbin/modprobe -q -r intel_sdsi; then
  13. echo "drivers/sdsi: [SKIP]"
  14. exit 77
  15. fi
  16. if /sbin/modprobe -q intel_sdsi && python3 -m pytest sdsi_test.py; then
  17. echo "drivers/sdsi: [OK]"
  18. else
  19. echo "drivers/sdsi: [FAIL]"
  20. exit 1
  21. fi