X-Git-Url: https://dreyeck.freedombox.rocks/gitweb/topic-maps.git/blobdiff_plain/bc4fcf0f126bab6567b37a21fc8c8eab2944c152..d024dc96ce091db06b9d09ea7c1ccb5f90b2886d:/scripts/fresh-sbcl.lisp?ds=inline diff --git a/scripts/fresh-sbcl.lisp b/scripts/fresh-sbcl.lisp index ec84607..b373522 100644 --- a/scripts/fresh-sbcl.lisp +++ b/scripts/fresh-sbcl.lisp @@ -80,3 +80,41 @@ (concatenate 'string report ".mergemap.json")) (uiop:symbol-call :topic-maps.include.tests :write-include-report (concatenate 'string report ".include.json")))) + +;; Explicit opt-in integration after the unchanged core suites and reports. +;; Restore only the caller's qualified source registry, then load the adapter. +(let ((prefix (uiop:getenv "TOPIC_MAPS_XTM_MERGEMAP_REPORT"))) + (when prefix + (let ((calls 0)) + (handler-case + (progn + (uiop:symbol-call :topic-maps.ctm :deserialize-string + "%mergemap " + :document-iri "urn:adapter-boundary" + :resource-resolver (lambda (&rest args) (declare (ignore args)) (incf calls))) + (error "Core CTM unexpectedly accepted XTM without its explicit adapter.")) + (topic-maps.ctm:ctm-unsupported (condition) + (assert (and (zerop calls) (eq :xtm-mergemap-reader-required (topic-maps.ctm:error-code condition))))))) + (format t "XTM-ADAPTER-BOUNDARY-PASS: explicit adapter required before resource retrieval~%") + (asdf:initialize-source-registry + (let ((*read-eval* nil)) + (read-from-string + (or (uiop:getenv "CL_SOURCE_REGISTRY") + (error "XTM integration requires the prepared qualified source registry."))))) + (asdf:test-system "topic-maps/ctm/xtm-tests") + (uiop:symbol-call :topic-maps.xtm-mergemap.tests :write-reports prefix))) + + +;; Slice 20A registration always runs after the retained suites and the optional +;; XTM adapter. Historical reports above remain snapshots of their own stages. +(asdf:test-system "topic-maps/ctm/registered-original-tests") +(let ((prefix (uiop:getenv "TOPIC_MAPS_REGISTERED_ORIGINALS_REPORT"))) + (when prefix + (uiop:symbol-call :topic-maps.registered-original.tests :write-reports prefix))) + + +;; Slice 20B runs after the unchanged Slice 20A snapshot in the same fresh process. +(asdf:test-system "topic-maps/ctm/registered-negative-tests") +(let ((prefix (uiop:getenv "TOPIC_MAPS_REGISTERED_NEGATIVES_REPORT"))) + (when prefix + (uiop:symbol-call :topic-maps.registered-original.tests :write-negative-reports prefix)))