diff --git a/testing/device-testing/.gitignore b/testing/device-testing/.gitignore new file mode 100644 index 0000000000..c18dd8d83c --- /dev/null +++ b/testing/device-testing/.gitignore @@ -0,0 +1 @@ +__pycache__/ diff --git a/testing/device-testing/Makefile b/testing/device-testing/Makefile new file mode 100644 index 0000000000..bde80127a1 --- /dev/null +++ b/testing/device-testing/Makefile @@ -0,0 +1,20 @@ +# Makefile for running Python tests + +# Shell to use with Make +SHELL := /bin/bash + +# Find all Python test scripts +TEST_SCRIPTS := $(shell find . -type f -name 'test.py' ) + +.PHONY: test + +test-on-hardware-wiping-your-device: + @for script in $(TEST_SCRIPTS) ; do \ + echo "Running $$script..." ; \ + python -m unittest $$script ; \ + if [ $$? -ne 0 ]; then \ + echo "Test failed: $$script" ; \ + exit 1 ; \ + fi ; \ + done + diff --git a/testing/device-testing/mouse-keys-defaults/mouse_keys_defaults.py b/testing/device-testing/mouse-keys-defaults/test.py similarity index 100% rename from testing/device-testing/mouse-keys-defaults/mouse_keys_defaults.py rename to testing/device-testing/mouse-keys-defaults/test.py diff --git a/testing/device-testing/spacecadet-off/space_cadet_off_after_reboot_and_reset.py b/testing/device-testing/spacecadet-off/test.py similarity index 100% rename from testing/device-testing/spacecadet-off/space_cadet_off_after_reboot_and_reset.py rename to testing/device-testing/spacecadet-off/test.py diff --git a/testing/device-testing/sticky-keys-off/sticky_off_after_reboot_and_reset.py b/testing/device-testing/sticky-keys-off/test.py similarity index 100% rename from testing/device-testing/sticky-keys-off/sticky_off_after_reboot_and_reset.py rename to testing/device-testing/sticky-keys-off/test.py