From ca06a623b1d5e78fc6fe97cf9aed875e0f41825e Mon Sep 17 00:00:00 2001 From: retropikzel Date: Sun, 14 Sep 2025 11:55:04 +0300 Subject: [PATCH] Fixing tests --- Dockerfile.test | 10 +++++++--- Makefile | 6 +++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Dockerfile.test b/Dockerfile.test index 4349494..6742416 100644 --- a/Dockerfile.test +++ b/Dockerfile.test @@ -7,10 +7,14 @@ RUN apt-get update && apt-get install -y \ libffi-dev \ ca-certificates \ git \ - pandoc + pandoc \ + chicken-bin +RUN chicken-install r7rs ENV PATH=${PATH}:/usr/local-other/bin ARG SCHEME=chibi ENV COMPILE_R7RS=${SCHEME} -RUN git clone https://github.com/ashinn/chibi-scheme.git --depth=1 \ - && cd chibi-scheme && make -j 16 && make -j 16 install +RUN git clone https://github.com/ashinn/chibi-scheme.git --depth=1 +RUN cd chibi-scheme && make -j 16 && make -j 16 install +RUN snow-chibi install --always-yes --impls=chibi,chicken "(foreign c)" +RUN snow-chibi install --always-yes --impls=chibi,chicken "(srfi 170)" RUN mkdir -p ${HOME}/.snow && echo "()" > ${HOME}/.snow/config.scm diff --git a/Makefile b/Makefile index ae0becd..7d530a3 100644 --- a/Makefile +++ b/Makefile @@ -47,8 +47,8 @@ test-r6rs: mkdir -p ${R6RSTMP}/libs/foo printf "#!r6rs\n(library (foo bar) (export baz) (import (rnrs)) (define baz (lambda () (display \"Test successfull\") (newline))))" > ${R6RSTMP}/libs/foo/bar.sls printf "#!r6rs\n(import (rnrs) (foo bar)) (baz)" > ${R6RSTMP}/main.sps - cd ${R6RSTMP} && COMPILE_R7RS=${SCHEME} timeout 60 compile-r7rs -I ./libs -o main main.sps - -cd ${R6RSTMP} && timeout 60 ./main > compile-r7rs-test-result.txt 2>&1 + cd ${R6RSTMP} && COMPILE_R7RS=${SCHEME} compile-r7rs -I ./libs -o main main.sps + -cd ${R6RSTMP} && ./main > compile-r7rs-test-result.txt 2>&1 @grep "Test successfull" ${R6RSTMP}/compile-r7rs-test-result.txt || (echo "Test failed, output: " && cat ${R6RSTMP}/compile-r7rs-test-result.txt && exit 1) test-r6rs-docker: @@ -70,7 +70,7 @@ test-r7rs: echo "(define over-9000 (lambda () (+ 1 1)))" > ${R7RSTMP}/libs/srfi/9001.scm echo "(define-library (srfi 9001) (import (scheme base) (scheme write)) (export over-9000) (include \"9001.scm\"))" > ${R7RSTMP}/libs/srfi/9001.sld cd ${R7RSTMP} && COMPILE_R7RS=${SCHEME} compile-r7rs -I ./libs -o main main.scm - -cd ${R7RSTMP} && timeout 60 ./main > compile-r7rs-test-result.txt 2>&1 + -cd ${R7RSTMP} && ./main > compile-r7rs-test-result.txt 2>&1 @grep "Test successfull" ${R7RSTMP}/compile-r7rs-test-result.txt || (echo "Test failed, output: " && cat ${R7RSTMP}/compile-r7rs-test-result.txt && exit 1) test-r7rs-docker: