Skip to content
Snippets Groups Projects
Commit d255b817 authored by Guido Gunther's avatar Guido Gunther :zzz: Committed by Guido Gunther
Browse files

pytests: Add helpers to skip tests on the devkit and phone

parent a19aca10
No related branches found
No related tags found
No related merge requests found
# Board type related helpers
def _get_board_type():
with open('/proc/device-tree/model') as f:
# model ends with a null byte
return f.readline().strip().strip('\00')
def is_librem5():
return _get_board_type() == r'Purism Librem 5'
def is_devkit():
return _get_board_type() == 'Purism Librem 5 devkit'
if __name__ == '__main__':
print("Board: '{}'".format(_get_board_type()))
print('devkit: {}'.format(is_devkit()))
print('librem5: {}'.format(is_librem5()))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment