Improving tests

This commit is contained in:
retropikzel 2026-03-14 12:32:36 +02:00
parent 808369f4e5
commit 3c722ac181
4 changed files with 14 additions and 15 deletions

View File

@ -18,10 +18,6 @@ RUN install compile-r7rs /usr/local/bin/compile-r7rs
RUN mkdir -p /root/.snow && echo "()" > /root/.snow/config.scm 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 WORKDIR /workdir
ARG SCHEME=chibi ARG SCHEME=chibi
ENV COMPILE_R7RS=${SCHEME} ENV COMPILE_R7RS=${SCHEME}

View File

@ -14,16 +14,18 @@ TEST_DEPENDS=srfi.64 retropikzel.mouth retropikzel.ctrf
SFX=scm SFX=scm
SNOW=snow-chibi --impls=${SCHEME} install --skip-tests?=1 --always-yes SNOW=snow-chibi --impls=${SCHEME} install --skip-tests?=1 --always-yes
LIB_PATHS=
ifeq "${RNRS}" "r6rs" ifeq "${RNRS}" "r6rs"
SNOW=snow-chibi --impls=${SCHEME} install --skip-tests?=1 --always-yes --install-source-dir=. --install-library-dir=. SNOW=snow-chibi --impls=${SCHEME} install --skip-tests?=1 --always-yes --install-source-dir=. --install-library-dir=.
SFX=sps SFX=sps
LIB_PATHS=-I .akku/lib
endif endif
all: build all: build
build: retropikzel/${LIBRARY}/LICENSE retropikzel/${LIBRARY}/VERSION retropikzel/${LIBRARY}/README.md build: retropikzel/${LIBRARY}/LICENSE retropikzel/${LIBRARY}/VERSION retropikzel/${LIBRARY}/README.md
echo "<pre>$$(cat retropikzel/${LIBRARY}/README.md)</pre>" > ${README} echo "<pre>$$(cat retropikzel/${LIBRARY}/README.md)</pre>" > ${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: index:
snow-chibi index ${PKG} snow-chibi index ${PKG}
@ -38,11 +40,12 @@ logs:
mkdir -p logs mkdir -p logs
test: logs build index test: logs build index
rm -rf .tmp
mkdir -p .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 && ${SNOW} ${TEST_DEPENDS} retropikzel.${LIBRARY}
cd .tmp && akku install akku-r7rs 2>/dev/null cd .tmp && akku install akku-r7rs
cd .tmp && COMPILE_R7RS=${SCHEME} CSC_OPTIONS="-L -lcurl" compile-r7rs -I .akku/lib -o test test.${SFX}; cd .tmp && COMPILE_R7RS=${SCHEME} CSC_OPTIONS="-L -lcurl" compile-r7rs ${LIB_PATHS} -o test test.${SFX};
cd .tmp && ./test cd .tmp && ./test
mv .tmp/*.json logs/ || true mv .tmp/*.json logs/ || true

View File

@ -4,9 +4,9 @@
(scheme char) (scheme char)
(scheme file) (scheme file)
(scheme process-context) (scheme process-context)
(retropikzel mouth)
(srfi 64) (srfi 64)
(retropikzel ctrf) ;(retropikzel mouth)
;(retropikzel ctrf)
(retropikzel LIBRARY)) (retropikzel LIBRARY))
(test-runner-current (ctrf-runner)) ;(test-runner-current (ctrf-runner))

View File

@ -1,9 +1,9 @@
#!r6rs #!r6rs
(import (rnrs) (import (except (rnrs) delete-file)
(srfi :64) (srfi :64)
(srfi :98) (srfi :98)
(retropikzel mouth) ;(retropikzel mouth)
(retropikzel ctrf) ;(retropikzel ctrf)
(retropikzel LIBRARY)) (retropikzel LIBRARY))
(test-runner-current (ctrf-runner)) ;(test-runner-current (ctrf-runner))