Compare commits

..

No commits in common. "3c722ac1818d98b6dcc9cb9c24c8c663b86213e4" and "2ee47c348a2d4de86c7e7a0ff248fa911caad730" have entirely different histories.

4 changed files with 29 additions and 42 deletions

View File

@ -18,11 +18,13 @@ 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}
COPY test-headers.sps .
COPY test-headers.scm .
COPY Makefile .
COPY retropikzel retropikzel/

View File

@ -12,20 +12,11 @@ README=retropikzel/${LIBRARY}/README.html
TESTFILE=retropikzel/${LIBRARY}/test.scm
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 "<pre>$$(cat retropikzel/${LIBRARY}/README.md)</pre>" > ${README}
snow-chibi package --always-yes --version=${VERSION} --authors=${AUTHOR} --doc=${README} --description="${DESCRIPTION}" ${LIBRARY_FILE}
snow-chibi package --version=${VERSION} --authors=${AUTHOR} --doc=${README} --description="${DESCRIPTION}" ${LIBRARY_FILE}
index:
snow-chibi index ${PKG}
@ -36,20 +27,35 @@ install: index
uninstall:
snow-chibi remove --impls=${SCHEME} retropikzel.${LIBRARY}
logs:
mkdir -p logs
test: logs build index
rm -rf .tmp
mkdir -p logs
# tmpdir
mkdir -p .tmp
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
cd .tmp && COMPILE_R7RS=${SCHEME} CSC_OPTIONS="-L -lcurl" compile-r7rs ${LIB_PATHS} -o test test.${SFX};
# r6rs testfiles
printf "#!r6rs\n(import (rnrs) (srfi :64) (srfi :98) (retropikzel mouth) (retropikzel ctrf) (retropikzel ${LIBRARY}))" > .tmp/test.sps
echo "(test-runner-current (ctrf-runner))" >> .tmp/test.sps
cat ${TESTFILE} >> .tmp/test.sps
# r7rs testfiles
echo "(import (scheme base) (scheme write) (scheme read) (scheme char) (scheme file) (scheme process-context) (retropikzel mouth) (srfi 64) (retropikzel ctrf) (retropikzel ${LIBRARY}))" > .tmp/test.scm
echo "(test-runner-current (ctrf-runner))" >> .tmp/test.scm
cat ${TESTFILE} >> .tmp/test.scm
# r6rs
if [ "${RNRS}" = "r6rs" ]; then \
cd .tmp \
&& snow-chibi install --impls=${SCHEME} --skip-tests?=1 --always-yes --install-source-dir=. --install-library-dir=. ${TEST_DEPENDS} retropikzel.${LIBRARY} \
&& akku install akku-r7rs 2> /dev/null \
&& COMPILE_R7RS=${SCHEME} compile-r7rs -I .akku/lib -o test test.sps; \
fi
# r7rs
if [ "${RNRS}" = "r7rs" ]; then \
cd .tmp \
&& snow-chibi install --impls=${SCHEME} retropikzel.${LIBRARY} \
&& COMPILE_R7RS=${SCHEME} CSC_OPTIONS="-L -lcurl" compile-r7rs -o test test.scm; \
fi
cd .tmp && ./test
mv .tmp/*.json logs/ || true
test-docker: logs
test-docker:
docker build --build-arg IMAGE=${IMAGE} --build-arg SCHEME=${SCHEME} -f Dockerfile.test --tag=${SCHEME}-testing .
docker run -v "${PWD}/logs:/workdir/logs" -w /workdir ${SCHEME}-testing sh -c "make SCHEME=${SCHEME} RNRS=${RNRS} LIBRARY=${LIBRARY} test"

View File

@ -1,12 +0,0 @@
(import (scheme base)
(scheme write)
(scheme read)
(scheme char)
(scheme file)
(scheme process-context)
(srfi 64)
;(retropikzel mouth)
;(retropikzel ctrf)
(retropikzel LIBRARY))
;(test-runner-current (ctrf-runner))

View File

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