File: test-daemon.sh

package info (click to toggle)
openrazer 3.11.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,436 kB
  • sloc: ansic: 15,895; python: 11,981; sh: 583; xml: 280; makefile: 133
file content (16 lines) | stat: -rwxr-xr-x 561 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash -ex

all_devices=$(ls pylib/openrazer/_fake_driver/*.cfg | wc -l)

daemon_devices=$(PYTHONPATH="pylib:daemon" python3 -c "from openrazer.client import DeviceManager; mgr = DeviceManager(); print(len(mgr.devices))")

if [ "$all_devices" != "$daemon_devices" ]; then
    echo
    echo "Unexpected discrepancy between devices in fake driver and devices from daemon:"
    echo "$all_devices != $daemon_devices"
    echo
    exit 1
fi

PYTHONPATH="pylib:daemon" python3 scripts/ci/test-daemon.py
PYTHONPATH="pylib:daemon" python3 scripts/ci/test-pids.py