mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-27 11:58:53 -06:00
fix: return target skip notes, print them in scope
build_target_cores_cache printed its INFO notes itself, so expected_pack_names wrote notes about platforms nobody asked for. The notes come back with the cache and target_scope, the command-line wrapper, prints them.
This commit is contained in:
1 parent
57ee0cdd8f
commit
8787f453c7
5 files changed
+29
-21
No files matched your search
@@ -19,7 +19,7 @@ from core.cli import SourceUnreadable
|
||||
from core.github import github_token, _gh_cli_token
|
||||
from model.profiles import select_emulator_profiles, ProfileSelectionError
|
||||
from model.registry import list_registered_platforms
|
||||
from model.targets import load_target_config, build_target_cores_cache
|
||||
from model.targets import load_target_config, build_target_cores_cache, target_scope
|
||||
from exporter import diffreport
|
||||
import pipeline
|
||||
from orchestrate import guards, labels, prepare, runner
|
||||
@@ -312,7 +312,13 @@ class AMistypedTargetEndsEveryToolAlike(unittest.TestCase):
|
||||
platforms = list_registered_platforms(str(REPO_ROOT / "platforms"))
|
||||
out, err = io.StringIO(), io.StringIO()
|
||||
with contextlib.redirect_stdout(out), contextlib.redirect_stderr(err):
|
||||
build_target_cores_cache(platforms, "switch", str(REPO_ROOT / "platforms"), is_all=True)
|
||||
_cache, _kept, notes = build_target_cores_cache(
|
||||
platforms, "switch", str(REPO_ROOT / "platforms"), is_all=True
|
||||
)
|
||||
self.assertEqual(out.getvalue() + err.getvalue(), "")
|
||||
self.assertTrue(any(n.startswith("INFO: Skipping") for n in notes))
|
||||
with contextlib.redirect_stdout(out), contextlib.redirect_stderr(err):
|
||||
target_scope(platforms, "switch", str(REPO_ROOT / "platforms"), is_all=True)
|
||||
self.assertEqual(out.getvalue(), "")
|
||||
self.assertIn("INFO: Skipping", err.getvalue())
|
||||
|
||||
|
||||
Reference in new issue
Block a user