about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-10-02 12:59:39 +0000
committerPjotr <wrk@bosa.lan>2026-10-02 12:59:39 +0000
commit4dd78e7bd2bbde84a316c12f7d985edc62afcbb9 (patch)
tree08e5463a7f3d85360747814a80ee70203117962a
parent00e5b05f5dccc445690cc1aa34c35100984cb0de (diff)
downloadgn-bnw-4dd78e7bd2bbde84a316c12f7d985edc62afcbb9.tar.gz
test: drop hardcoded factory paths; new containers/ location; forge -L
$FACTORY renames to $base and every checkout path becomes overridable
(GUIX_BIOINF, GN_MACHINES, GUIX_FORGE, RUN_GUIX_CONTAINER; defaults
$base/code/<checkout> for the factory layout).  CONTAINER_SCM follows
the bnw-container move to genenetwork/containers/ and the container
build now passes the guix-forge load path required by (forge anubis)
since the Anubis enablement.
-rw-r--r--Makefile6
-rwxr-xr-xtest/run_container_tests.sh20
2 files changed, 17 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index b75e6458..b8495f88 100644
--- a/Makefile
+++ b/Makefile
@@ -3,8 +3,10 @@
 # The container tests build the BNW package from THIS checkout via the
 # BNW_LOCAL_SOURCE hook in guix-bioinformatics/gn/packages/bnw.scm, so
 # source changes here are what gets tested -- no upstream tarball, no
-# patch.  Requires the factory layout (../guix-bioinformatics,
-# ../gn-machines, ../run-guix-container) and the run-guix-system-container
+# patch.  Requires a checkout layout with guix-bioinformatics,
+# gn-machines, run-guix-container and contrib/guix-forge/guix side by
+# side (paths overridable in test/run_container_tests.sh) and the
+# run-guix-system-container
 # daemon on 127.0.0.1:8900.
 #
 #   make            build from this checkout and run the container tests
diff --git a/test/run_container_tests.sh b/test/run_container_tests.sh
index 3875d368..4657d77b 100755
--- a/test/run_container_tests.sh
+++ b/test/run_container_tests.sh
@@ -10,21 +10,27 @@
 #            killed on success, kept on failure for debugging)
 #
 # Environment overrides:
-#   FACTORY    factory root (default: derived from this script)
+#   base      checkout root (default: derived from this script; set
+#             to a directory holding the checkouts side by side)
 #   DAEMON     daemon address (default 127.0.0.1:8900)
 #   BASE_URL   BNW base url (default http://127.0.0.1:8881)
 
 set -u
 
 HERE="$(cd "$(dirname "$0")" && pwd)"
-FACTORY="${FACTORY:-$(cd "$HERE/../../.." && pwd)}"
+# Layout note: the default base assumes the factory layout
+# (<root>/code/<checkout>).  For a different layout (e.g. bare
+# ~/guix/<checkout>) set the *_DIR variables directly:
+#   GUIX_BIOINF, GN_MACHINES, GUIX_FORGE, RUN_GUIX_CONTAINER
+base="${base:-$(cd "$HERE/../../.." && pwd)}"
 DAEMON="${DAEMON:-127.0.0.1:8900}"
 export BASE_URL="${BASE_URL:-http://127.0.0.1:8881}"
 
-GUIX_BIOINF="$FACTORY/code/guix-bioinformatics"
-GN_MACHINES="$FACTORY/code/gn-machines"
-CONTAINER_SCM="$GN_MACHINES/genenetwork/services/bnw-container.scm"
-RUN_GUIX_CONTAINER="$FACTORY/code/run-guix-container/bin/run-guix-container.rb"
+GUIX_BIOINF="${GUIX_BIOINF:-$base/code/guix-bioinformatics}"
+GN_MACHINES="${GN_MACHINES:-$base/code/gn-machines}"
+GUIX_FORGE="${GUIX_FORGE:-$base/code/contrib/guix-forge/guix}"
+CONTAINER_SCM="$GN_MACHINES/genenetwork/containers/bnw-container.scm"
+RUN_GUIX_CONTAINER="${RUN_GUIX_CONTAINER:-$base/code/run-guix-container/bin/run-guix-container.rb}"
 # The container's admin key lives in the invoking user's $HOME (see
 # the README; the keys are generated by hand and not in any repo).
 CLIENT_KEY="${CLIENT_KEY:-$HOME/hello-container-key}"
@@ -49,7 +55,7 @@ sleep 2
 # --- 2. build the container -------------------------------------------
 echo "== building container =="
 HASH=$(guix system container --network \
-       -L "$GUIX_BIOINF" -L "$GN_MACHINES" \
+       -L "$GUIX_BIOINF" -L "$GN_MACHINES" -L "$GUIX_FORGE" \
        "$CONTAINER_SCM" 2>/dev/null | tail -1)
 [ -n "$HASH" ] || die "container build failed"
 echo "built: $HASH"