fix: list boards offline from the given list

--list-targets offline was refused, and its advice to give --manifest or --from-pack was refused in turn. It now reads the boards where --target reads them: the pack's list or targets/<platform>.json beside --manifest.
This commit is contained in:
Abdessamad Derraz committed 2026-11-06 03:16:00 +01:00
1 parent b873c6a9fb
commit 349914fda2
5 files changed
+28 -12

No files matched your search

+15
View File
@@ -463,6 +463,21 @@ class ABoardWithoutTheNetwork(Scratch):
self.assertEqual(proc.returncode, 0, proc.stdout + proc.stderr)
self.assertIn("for target psx-board", proc.stdout)
def test_the_boards_are_listed_from_where_target_reads_them(self):
"""Offline, the refusal of --list-targets named --manifest, and
--manifest with --list-targets was refused: no form listed a board."""
(self.root / "targets").mkdir()
(self.root / "targets" / "retroarch.json").write_text(json.dumps(BOARDS))
_carrying(self.pack, {"install_list": manifest(), "targets": BOARDS})
for given in (["--offline", "--manifest", str(self.list)],
["--from-pack", str(self.pack)]):
with self.subTest(given=given[-1]):
proc = self.run_installer(*given, "--list-targets", "--no-input")
self.assertEqual(proc.returncode, 0, proc.stdout + proc.stderr)
for board in BOARDS:
self.assertIn(f" {board} (", proc.stdout)
self.assertFalse(self.dest.exists())
def test_a_pack_without_a_list_says_why(self):
proc = self.run_installer("--from-pack", str(self.pack), "--target", "gba-board",
"--no-input")