Commit ac696d43 authored by Guido Gunther's avatar Guido Gunther Committed by Guido Gunther
Browse files

pytests: Test gpu regulator voltage

This also adds helper that makes testing other regulators simple.
parent 6ea6595b
import re
def check_voltage(regulator, voltage):
r = re.compile(r" +{} ".format(regulator))
for line in open('/sys/kernel/debug/regulator/regulator_summary').readlines():
if r.match(line):
val = line.split()[5]
assert(val == "{}mV".format(voltage))
return
assert(False)
# This is true until the GPU does DVFS
def test_gpu_regulator():
check_voltage("buck5", 900)
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