forked from Mirror/pmbootstrap
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:
parent
c5d0f76005
commit
6bb7f022b1
4 changed files with 32 additions and 3 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue