Commit 3a57465b authored by Guido Gunther's avatar Guido Gunther
Browse files

Move tests to pytests

This makes installing them simpler since we don't have to distinguish
between these and other python based tests and programs.
parent d1ef9ac5
# The pyunit tests # The pyunit tests
test_scripts/test_*.py usr/share/librem5-devkit/check/ pytests/*.py usr/share/librem5-devkit/check/
test_scripts/ usr/share/librem5-devkit/check/
test_scripts/ usr/share/librem5-devkit/check/
# The script that runs the pyunit tests # The script that runs the pyunit tests
test_scripts/librem5-devkit-check usr/bin/ test_scripts/librem5-devkit-check usr/bin/
# Other helpers # Other helpers
import os
import subprocess
def read_or_unknown(path):
if os.path.exists(path):
return open(path).read().strip()
return "(unknown)"
def pytest_report_header(config):
gitrev_log = '/var/log/gitrev.log'
dt_model = '/sys/firmware/devicetree/base/model'
model = read_or_unknown(dt_model)
kernel = subprocess.check_output(["uname", "-a"]).decode('utf-8').strip()
img_gitrev = read_or_unknown(gitrev_log)
return """
model: {}
kernel: {}
image gitrev: {}
""".format(model, kernel, img_gitrev)
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