Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/scripts/run_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,14 @@ def _smoke_hands_path():
)
# Prefer the shared resolver, but never require Brain. A bundle's
# Brain may be a symlink to canonical; reject that foreign answer.
resolver_file = root / "PyAutoBrain" / "agents" / "_pyauto_root.py"
if resolver_file.is_file():
resolvers = [p for p in (
root / "PyAutoBrain" / "agents" / "_pyauto_root.py",
root / "organs" / "PyAutoBrain" / "agents" / "_pyauto_root.py",
) if p.is_file()]
if len({p.resolve() for p in resolvers}) > 1:
raise RuntimeError("PyAutoBrain has distinct flat and grouped checkouts")
resolver_file = resolvers[0] if resolvers else None
if resolver_file is not None:
try:
spec = importlib.util.spec_from_file_location(
"_smoke_root_resolver", resolver_file
Expand All @@ -71,7 +77,11 @@ def _smoke_hands_path():
root = resolved
except (Exception, SystemExit):
pass # Missing/broken optional resolver cannot break discovery.
hands = root / "PyAutoHands" / "autohands"
flat = root / "PyAutoHands" / "autohands"
grouped = root / "organs" / "PyAutoHands" / "autohands"
if (flat / "build_util.py").is_file() and (grouped / "build_util.py").is_file() and flat.resolve() != grouped.resolve():
raise RuntimeError("PyAutoHands has distinct flat and grouped checkouts")
hands = grouped if (grouped / "build_util.py").is_file() else flat
if not (hands / "build_util.py").is_file():
raise ModuleNotFoundError(
f"PyAutoHands not found for {WORKSPACE}; looked for "
Expand Down
Loading