From 438255a149ff040801517470da7d4ca11b6680ed Mon Sep 17 00:00:00 2001 From: takeokunn Date: Sat, 24 Oct 2026 07:45:46 +0900 Subject: [PATCH 1/4] test: prove ASDF rejects a registered failure --- .github/workflows/ci.yml | 21 +++++++++++++++++++++ t/e2e-ast-test.lisp | 5 +++++ 2 files changed, 26 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d30a1fa..be32053 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,27 @@ jobs: cachix-cache: ${{ vars.CACHIX_CACHE }} cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} + - name: Confirm a registered test failure makes ASDF fail + shell: bash + run: | + log="$RUNNER_TEMP/asdf-control.log" + set +e + nix develop --command sbcl --noinform --non-interactive \ + --eval '(require :asdf)' \ + --eval '(asdf:test-system "cl-cc-javascript")' > "$log" 2>&1 + status=$? + set -e + cat "$log" + if [ "$status" -eq 0 ]; then + echo "::error::ASDF unexpectedly accepted the intentional test failure." + exit 1 + fi + if ! grep -Fq "cl-cc-javascript tests failed" "$log"; then + echo "::error::ASDF failed before the test system reported its expected failure." + exit 1 + fi + echo "Observed the expected ASDF failure (exit $status)." + # Runs the SBCL test suite (checks.default), the treefmt formatting gate # (checks.formatting), and the mkdocs --strict build (checks.docs). # Add `--all-systems` only when the flake declares more than one system. diff --git a/t/e2e-ast-test.lisp b/t/e2e-ast-test.lisp index 34cdc38..b6031d1 100644 --- a/t/e2e-ast-test.lisp +++ b/t/e2e-ast-test.lisp @@ -340,3 +340,8 @@ const upper = user?.profile?.address?.city?.toUpperCase(); (equal (optional-chain-keys (first upper-args)) '("profile" "address" "city"))) :to-be-truthy))))) + +;;; W2-23 control: verify that one registered failure makes ASDF fail. + +(it-sequential "js-e2e-control-intentional-failure" + (expect nil :to-be-truthy)) From bdd25731db3877aeccfd297435ffd2164f6f2683 Mon Sep 17 00:00:00 2001 From: takeokunn Date: Sat, 24 Oct 2026 07:48:18 +0900 Subject: [PATCH 2/4] test: load ASDF definition for failure control --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be32053..e5dfaec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,7 @@ jobs: set +e nix develop --command sbcl --noinform --non-interactive \ --eval '(require :asdf)' \ + --eval '(asdf:load-asd "cl-cc-javascript.asd")' \ --eval '(asdf:test-system "cl-cc-javascript")' > "$log" 2>&1 status=$? set -e From 9a7aeacd84fe60e0ac91b998be4b172444169478 Mon Sep 17 00:00:00 2001 From: takeokunn Date: Sat, 24 Oct 2026 08:10:07 +0900 Subject: [PATCH 3/4] test: pass an absolute ASDF definition path --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5dfaec..a12eddd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,7 @@ jobs: set +e nix develop --command sbcl --noinform --non-interactive \ --eval '(require :asdf)' \ - --eval '(asdf:load-asd "cl-cc-javascript.asd")' \ + --eval '(asdf:load-asd (truename "cl-cc-javascript.asd"))' \ --eval '(asdf:test-system "cl-cc-javascript")' > "$log" 2>&1 status=$? set -e From 95933987e9149a4c26716d5ffa63c4bdbf445ffa Mon Sep 17 00:00:00 2001 From: takeokunn Date: Sat, 24 Oct 2026 09:35:39 +0900 Subject: [PATCH 4/4] test: initialize ASDF dependencies in failure control --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a12eddd..ea6ebce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,8 @@ jobs: set +e nix develop --command sbcl --noinform --non-interactive \ --eval '(require :asdf)' \ + --eval '(load "scripts/dependency-roots.lisp")' \ + --eval '(initialize-dependency-source-registry)' \ --eval '(asdf:load-asd (truename "cl-cc-javascript.asd"))' \ --eval '(asdf:test-system "cl-cc-javascript")' > "$log" 2>&1 status=$?