mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-01 00:27:20 -05:00
refactor: refuse unsandboxed campaign runs
Without a working bubblewrap the pass is refused and nothing third-party runs, probes require the sandbox and builds are refused, unless --allow-unsandboxed is given. A job report holding an alert raises an autorun alert.
This commit is contained in:
1 parent
e440073562
commit
fd449fdae3
5 files changed
+93
-6
No files matched your search
@@ -236,6 +236,19 @@ class StepEnvironment(Scratch):
|
||||
self.assertEqual(given["GITHUB_TOKEN"], "t1")
|
||||
|
||||
|
||||
class ReportAlert(Scratch):
|
||||
def test_a_report_alert_is_raised_then_cleared(self):
|
||||
write = "import json, sys; json.dump({'alert': sys.argv[1]} if sys.argv[1] else {}, open('r.json', 'w'))"
|
||||
for message, expected in (("no sandbox", True), ("", False)):
|
||||
ctx = self.context({"x": {"worktree": False, "min_free_gb": 0, "report": "r.json",
|
||||
"steps": [[PY, "-c", write, message]]}})
|
||||
ar.run_job(ctx, "x")
|
||||
alerts = self.state(ctx).get("alerts", {})
|
||||
self.assertEqual("job:x" in alerts, expected)
|
||||
if expected:
|
||||
self.assertEqual(alerts["job:x"]["detail"], "no sandbox")
|
||||
|
||||
|
||||
class Retry(Scratch):
|
||||
def _runs(self, *outcomes: ar.Outcome):
|
||||
queue = list(outcomes)
|
||||
|
||||
Reference in new issue
Block a user