Commit fe0228b1 authored by Guido Gunther's avatar Guido Gunther

Merge branch 'tests' into 'master'

Add test for cpufreq and adjust tests for linux 5.2

See merge request !48
parents 8dca3659 85d50063
Pipeline #12632 passed with stages
in 3 minutes and 9 seconds
def test_battery_cpufreq():
assert("1000000" in open("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq").read())
assert("1000000" in open("/sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_min_freq").read())
assert("1000000" in open("/sys/devices/system/cpu/cpu2/cpufreq/cpuinfo_min_freq").read())
assert("1000000" in open("/sys/devices/system/cpu/cpu3/cpufreq/cpuinfo_min_freq").read())
assert("1500000" in open("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq").read())
assert("1500000" in open("/sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_max_freq").read())
assert("1500000" in open("/sys/devices/system/cpu/cpu2/cpufreq/cpuinfo_max_freq").read())
assert("1500000" in open("/sys/devices/system/cpu/cpu3/cpufreq/cpuinfo_max_freq").read())
def test_gyro():
assert("lsm9ds1_gyro" in open('/sys/class/i2c-adapter/i2c-2/2-006a/iio:device0/name').read())
def test_gyro():
assert("lsm9ds1_magn" in open('/sys/bus/iio/devices/iio:device0/name').read())
def test_panel_brightness():
"Check if current panel brighness is in [0..9]"
f = open("/sys/class/backlight/backlight_dsi/brightness")
f = open("/sys/class/backlight/backlight-dsi/brightness")
assert int(f.read()) in range(0, 101)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment