From 513a1490084e2679670dd6241e1473c3c221f1ff Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 8 Sep 2026 12:21:31 -0400 Subject: ocda db: .ocda.db, and a script to run 4 tests The per document database is now written as .ocda.db rather than .abstraction.db. Shorter, and it says what is in the file: the object centric document abstraction, not "some abstraction". .ocda.db pairs with .ssp and cannot be mistaken for the collection search database (spine.search.db). test/run-tests.sh runs the four in sequence, one line of result each, and a summary. It re-runs itself inside nix shell "nixpkgs#sqlite" if sqlite3 is not on PATH, so this is all that is needed: SpinePOD=../../markup/sisudoc-spine-samples/markup/pod-samples/pod \ ./test/run-tests.sh ./bin/spine-ldc The tests are independent (with test-abstraction-ssp.sh run first): 1 test-abstraction-ssp.sh is first because it is the one that says whether the abstraction itself moved; if it fails the others are answering a different question than you think 2 test-abstraction-ssp-roundtrip.sh reads the committed reference set, so it is a statement about the current binary only if 1 passes 3 test-abstraction-db.sh and 4 test-abstraction-db-roundtrip.sh generate both artefacts themselves and depend on nothing committed (assisted by Claude-Code) --- test/test-abstraction-db-roundtrip.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/test-abstraction-db-roundtrip.sh') diff --git a/test/test-abstraction-db-roundtrip.sh b/test/test-abstraction-db-roundtrip.sh index 3051b78..ecde696 100755 --- a/test/test-abstraction-db-roundtrip.sh +++ b/test/test-abstraction-db-roundtrip.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh # test-abstraction-db-roundtrip.sh # -# Reads each .abstraction.db back into the abstraction, emits it as +# Reads each .ocda.db back into the abstraction, emits it as # .ssp, and requires the result to be byte identical to the .ssp written # from the same document. # @@ -56,15 +56,15 @@ mkdir -p "$OUT_DIR" echo "spine binary: $SPINE_BIN" echo "samples: $SAMPLES_DIR" -echo "Generating .ssp and .abstraction.db ..." +echo "Generating .ssp and .ocda.db ..." $SPINE_BIN --show-abstraction --show-abstraction-db --skip-output \ --output="$OUT_DIR" "$SAMPLES_DIR"/* 2>&1 | tail -1 COUNT=0 FAILURES=0 -for db in "$OUT_DIR"/*/abstraction/*.abstraction.db; do +for db in "$OUT_DIR"/*/abstraction/*.ocda.db; do [ -f "$db" ] || continue - ssp="${db%.abstraction.db}.ssp" + ssp="${db%.ocda.db}.ssp" base=$(basename "$ssp") COUNT=$((COUNT + 1)) if [ ! -f "$ssp" ]; then -- cgit v1.2.3