1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-24 21:15:10 +03:00

pmb: introduce deviceinfo_chassis (MR 1933)

"Chassis" defines the what kind of device a device is. Currently the
following standardized types exist:

  "desktop", "laptop", "convertible", "server", "tablet", "handset",
  "watch", "embedded", "vm", "container"

This property is exposed by org.freedesktop.hostname1 (e.g.
openrc-settingsd) and can be used by applications for example to display
appropriate strings instead of "About this phone" for non-phone devices.
This commit is contained in:
Luca Weiss 2020-05-03 18:14:42 +02:00 committed by Oliver Smith
parent c5d0f76005
commit 6bb7f022b1
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
4 changed files with 32 additions and 3 deletions

View file

@ -54,7 +54,7 @@ def generate(args, monkeypatch, answers):
"""
# Patched function
def fake_ask(args, question="Continue?", choices=["y", "n"], default="n",
lowercase_answer=True, validation_regex=None):
lowercase_answer=True, validation_regex=None, complete=None):
for substr, answer in answers.items():
if substr in question:
logging.info(question + ": " + answer)
@ -117,6 +117,7 @@ def test_aportgen_device_wizard(args, monkeypatch):
"Manufacturer": "Testsuite",
"Name": "Testsuite Testdevice",
"Year": "1337",
"Chassis": "handset",
"Type": "isorec",
}
@ -137,6 +138,7 @@ def test_aportgen_device_wizard(args, monkeypatch):
assert deviceinfo["manufacturer"] == answers["Manufacturer"]
assert deviceinfo["arch"] == "armhf"
assert deviceinfo["year"] == "1337"
assert deviceinfo["chassis"] == "handset"
assert deviceinfo["keyboard"] == "false"
assert deviceinfo["external_storage"] == "true"
assert deviceinfo["flash_method"] == "heimdall-isorec"