diff --git a/justfile b/justfile index 05babb9..28389a7 100644 --- a/justfile +++ b/justfile @@ -31,7 +31,7 @@ logging-contract: # source precedence, root/inspect inheritance, and typed serve parsing. environment-contract: zig build -Doptimize=ReleaseSafe - python3 tests/environment_contract.py + STREAM_UPSTREAM_REPO='{{upstream}}' python3 tests/environment_contract.py # Offline: validate the vendored upstream Grafana dashboard and its parser. dashboard-test: diff --git a/tests/environment_contract.py b/tests/environment_contract.py index 0dcacd0..2a8469e 100644 --- a/tests/environment_contract.py +++ b/tests/environment_contract.py @@ -19,8 +19,15 @@ import urllib.request BIN = "./zig-out/bin/stream" PIN = "f29815c391fc2644f8a3dd36b899fb3697dd1ea6" ROOT = pathlib.Path(__file__).resolve().parents[1] +# STREAM_UPSTREAM_REPO is the name the justfile, scripts/admit, and the other +# oracles already use; this file was the only one reading JETSTREAM_UPSTREAM, +# so on any box that does not lay the upstream out as ~/{forge}/{org}/{repo} +# it looked for a checkout that was never there. JETSTREAM_UPSTREAM still wins +# when set, for anyone who has it in their shell. UPSTREAM = pathlib.Path( - os.environ.get("JETSTREAM_UPSTREAM", pathlib.Path.home() / "github.com/bluesky-social/jetstream") + os.environ.get("JETSTREAM_UPSTREAM") + or os.environ.get("STREAM_UPSTREAM_REPO") + or (pathlib.Path.home() / "github.com/bluesky-social/jetstream") ).resolve()