refactor: move campaign and probe modes to probes

This commit is contained in:
Abdessamad Derraz committed 2026-11-21 15:47:20 +01:00
1 parent fd1c2e1c16
commit 2123bd8317
7 files changed
+206 -178

No files matched your search

+2 -2
View File
@@ -141,11 +141,11 @@ COMMANDS = {
"campaign.py": (
"probes/campaign.py", "probes/host.py", "probes/content.py", "probes/cores.py",
"probes/rules.py", "probes/state.py", "probes/gate.py", "probes/reports.py",
"probes/profileedit.py",
"probes/profileedit.py", "probes/entries.py", "probes/campaignmodes.py",
),
"standalone_probe.py": (
"probes/standaloneemulators.py", "probes/appimage.py", "probes/xvfb.py",
"probes/standalonerun.py", "probes/standalonerecord.py",
"probes/standalonerun.py", "probes/standalonerecord.py", "probes/standalonemodes.py",
),
"profile_sync.py": (
"profiling/citations.py", "profiling/anchoring.py", "profiling/repos.py",
+4 -3
View File
@@ -12,7 +12,7 @@ from pathlib import Path
import core_probe as cp
import standalone_probe as sp
from probes import appimage, standaloneemulators as emus, standalonerecord, standalonerun, xvfb
from probes import appimage, standaloneemulators as emus, standalonemodes, standalonerecord, standalonerun, xvfb
ROOT = Path(__file__).resolve().parent.parent
@@ -199,9 +199,10 @@ class HostLock(unittest.TestCase):
return 0
with tempfile.NamedTemporaryFile(suffix=".cue") as content, \
mock.patch.object(sp.cp, "host_probe_lock", lock), mock.patch.object(sp, "_probe", body):
mock.patch.object(standalonemodes.cp, "host_probe_lock", lock), \
mock.patch.object(standalonemodes, "_probe", body):
args = sp.build_parser().parse_args(["run", "duckstation", "--content", content.name])
self.assertEqual(sp.probe(args), 0)
self.assertEqual(standalonemodes.probe(args), 0)
self.assertEqual(events, ["take", "run", "free"])