From 3c722ac1818d98b6dcc9cb9c24c8c663b86213e4 Mon Sep 17 00:00:00 2001 From: retropikzel Date: Sat, 14 Mar 2026 12:32:36 +0200 Subject: [PATCH] Improving tests --- Dockerfile.test | 4 ---- Makefile | 11 +++++++---- test-headers.scm | 6 +++--- test-headers.sps | 8 ++++---- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/Dockerfile.test b/Dockerfile.test index 474af4b..d463cbb 100644 --- a/Dockerfile.test +++ b/Dockerfile.test @@ -18,10 +18,6 @@ RUN install compile-r7rs /usr/local/bin/compile-r7rs RUN mkdir -p /root/.snow && echo "()" > /root/.snow/config.scm -RUN snow-chibi install --impls=${SCHEME} --skip-tests?=1 --always-yes srfi.64 -RUN snow-chibi install --impls=${SCHEME} --skip-tests?=1 --always-yes retropikzel.mouth -RUN snow-chibi install --impls=${SCHEME} --skip-tests?=1 --always-yes retropikzel.ctrf - WORKDIR /workdir ARG SCHEME=chibi ENV COMPILE_R7RS=${SCHEME} diff --git a/Makefile b/Makefile index ba5ddaf..5ab2d8c 100644 --- a/Makefile +++ b/Makefile @@ -14,16 +14,18 @@ TEST_DEPENDS=srfi.64 retropikzel.mouth retropikzel.ctrf SFX=scm SNOW=snow-chibi --impls=${SCHEME} install --skip-tests?=1 --always-yes +LIB_PATHS= ifeq "${RNRS}" "r6rs" SNOW=snow-chibi --impls=${SCHEME} install --skip-tests?=1 --always-yes --install-source-dir=. --install-library-dir=. SFX=sps +LIB_PATHS=-I .akku/lib endif all: build build: retropikzel/${LIBRARY}/LICENSE retropikzel/${LIBRARY}/VERSION retropikzel/${LIBRARY}/README.md echo "
$$(cat retropikzel/${LIBRARY}/README.md)
" > ${README} - snow-chibi package --version=${VERSION} --authors=${AUTHOR} --doc=${README} --description="${DESCRIPTION}" ${LIBRARY_FILE} + snow-chibi package --always-yes --version=${VERSION} --authors=${AUTHOR} --doc=${README} --description="${DESCRIPTION}" ${LIBRARY_FILE} index: snow-chibi index ${PKG} @@ -38,11 +40,12 @@ logs: mkdir -p logs test: logs build index + rm -rf .tmp mkdir -p .tmp - cat test-headers.${SFX} ${TESTFILE} | sed 's/LIBRARY/${LIBRARY}/' >> .tmp/test.${SFX} + cat test-headers.${SFX} ${TESTFILE} | sed 's/LIBRARY/${LIBRARY}/' > .tmp/test.${SFX} cd .tmp && ${SNOW} ${TEST_DEPENDS} retropikzel.${LIBRARY} - cd .tmp && akku install akku-r7rs 2>/dev/null - cd .tmp && COMPILE_R7RS=${SCHEME} CSC_OPTIONS="-L -lcurl" compile-r7rs -I .akku/lib -o test test.${SFX}; + cd .tmp && akku install akku-r7rs + cd .tmp && COMPILE_R7RS=${SCHEME} CSC_OPTIONS="-L -lcurl" compile-r7rs ${LIB_PATHS} -o test test.${SFX}; cd .tmp && ./test mv .tmp/*.json logs/ || true diff --git a/test-headers.scm b/test-headers.scm index 6cddc4e..a6fd279 100644 --- a/test-headers.scm +++ b/test-headers.scm @@ -4,9 +4,9 @@ (scheme char) (scheme file) (scheme process-context) - (retropikzel mouth) (srfi 64) - (retropikzel ctrf) + ;(retropikzel mouth) + ;(retropikzel ctrf) (retropikzel LIBRARY)) -(test-runner-current (ctrf-runner)) +;(test-runner-current (ctrf-runner)) diff --git a/test-headers.sps b/test-headers.sps index 0aa99ca..240e4a2 100644 --- a/test-headers.sps +++ b/test-headers.sps @@ -1,9 +1,9 @@ #!r6rs -(import (rnrs) +(import (except (rnrs) delete-file) (srfi :64) (srfi :98) - (retropikzel mouth) - (retropikzel ctrf) + ;(retropikzel mouth) + ;(retropikzel ctrf) (retropikzel LIBRARY)) -(test-runner-current (ctrf-runner)) +;(test-runner-current (ctrf-runner))