From b33acd80bfa5ec13d4885356e45f4ec022d6651d Mon Sep 17 00:00:00 2001 From: Luca Weiss <luca@z3ntu.xyz> Date: Sun, 1 Nov 2020 12:46:36 +0100 Subject: [PATCH] ci: add sanity check for matrix capabilities --- scripts/ci/test-daemon.py | 14 ++++++++++++++ scripts/ci/test-daemon.sh | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 scripts/ci/test-daemon.py diff --git a/scripts/ci/test-daemon.py b/scripts/ci/test-daemon.py new file mode 100644 index 00000000..33a5ffed --- /dev/null +++ b/scripts/ci/test-daemon.py @@ -0,0 +1,14 @@ +#!/usr/bin/python3 +import openrazer.client + +devmgr = openrazer.client.DeviceManager() + +for d in devmgr.devices: + # Sanity check matrix capabilities + if d.has("lighting_led_matrix"): + d.fx.advanced.matrix[0, 0] = [0, 255, 0] + try: + d.fx.advanced.draw() + except Exception as e: + print('\n~~~ ' + d.name + ' ~~~\n') + print(e) diff --git a/scripts/ci/test-daemon.sh b/scripts/ci/test-daemon.sh index d0ef2648..06059b81 100755 --- a/scripts/ci/test-daemon.sh +++ b/scripts/ci/test-daemon.sh @@ -11,3 +11,5 @@ if [ "$all_devices" != "$daemon_devices" ]; then echo exit 1 fi + +PYTHONPATH="pylib:daemon" python3 scripts/ci/test-daemon.py -- GitLab