pmbootstrap init: only display UIs for device arch (MR 1937)

Hide user interfaces that are not available for the selected device's
architecture.

Closes #1790
This commit is contained in:
Anjandev Momi 2020-05-14 03:20:11 -07:00 committed by Oliver Smith
parent 2d2ab1df56
commit 0ff9c5d471
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
6 changed files with 55 additions and 7 deletions

View file

@ -216,12 +216,13 @@ def test_questions_keymaps(args, monkeypatch):
def test_questions_ui(args, monkeypatch):
args.aports = pmb_test.const.testdata + "/init_questions_device/aports"
device = "lg-mako"
fake_answers(monkeypatch, ["none"])
assert pmb.config.init.ask_for_ui(args) == "none"
assert pmb.config.init.ask_for_ui(args, device) == "none"
fake_answers(monkeypatch, ["invalid_UI", "weston"])
assert pmb.config.init.ask_for_ui(args) == "weston"
assert pmb.config.init.ask_for_ui(args, device) == "weston"
def test_questions_ui_extras(args, monkeypatch):