Fixes to ctrf library
This commit is contained in:
parent
fcbe5075bd
commit
ada573b217
|
|
@ -9,7 +9,8 @@ RUN wget https://gitlab.com/-/project/6808260/uploads/094ce726ce3c6cf8c14560f1e3
|
||||||
&& tar -xf akku-1.1.0.amd64-linux.tar.xz \
|
&& tar -xf akku-1.1.0.amd64-linux.tar.xz \
|
||||||
&& mv akku-1.1.0.amd64-linux akku
|
&& mv akku-1.1.0.amd64-linux akku
|
||||||
RUN git clone https://github.com/ashinn/chibi-scheme.git --depth=1
|
RUN git clone https://github.com/ashinn/chibi-scheme.git --depth=1
|
||||||
RUN git clone https://codeberg.org/retropikzel/compile-scheme.git --depth=1
|
RUN git clone https://codeberg.org/retropikzel/compile-scheme.git --depth=2
|
||||||
|
RUN git clone https://github.com/srfi-explorations/r7rs-srfi.git --branch=retropikzel-fixes --depth=2
|
||||||
WORKDIR /build/chibi-scheme
|
WORKDIR /build/chibi-scheme
|
||||||
RUN make
|
RUN make
|
||||||
RUN make install
|
RUN make install
|
||||||
|
|
@ -21,7 +22,8 @@ RUN git clone https://codeberg.org/foreign-c/foreign-c.git --depth=2
|
||||||
ARG SCHEME=chibi
|
ARG SCHEME=chibi
|
||||||
ARG IMAGE=${SCHEME}:head
|
ARG IMAGE=${SCHEME}:head
|
||||||
FROM schemers/${IMAGE}
|
FROM schemers/${IMAGE}
|
||||||
RUN apt-get update && apt-get install -y make gcc libffi-dev libcurl4 gauche
|
RUN apt-get update && apt-get install -y \
|
||||||
|
make gcc libffi-dev libcurl4 gauche jq git ca-certificates
|
||||||
RUN mkdir ${HOME}/.snow && echo "()" > ${HOME}/.snow/config.scm
|
RUN mkdir ${HOME}/.snow && echo "()" > ${HOME}/.snow/config.scm
|
||||||
COPY --from=build /build /build
|
COPY --from=build /build /build
|
||||||
ARG SCHEME=chibi
|
ARG SCHEME=chibi
|
||||||
|
|
@ -35,13 +37,12 @@ WORKDIR /build/akku
|
||||||
RUN bash install.sh
|
RUN bash install.sh
|
||||||
ENV PATH=/root/.local/bin:${PATH}
|
ENV PATH=/root/.local/bin:${PATH}
|
||||||
RUN akku update
|
RUN akku update
|
||||||
WORKDIR /build/foreign-c
|
RUN akku install chez-srfi akku-r7rs "(foreign c)"
|
||||||
RUN timeout 30 snow-chibi install --impls=${SCHEME} --always-yes "(srfi 64)" || true
|
|
||||||
RUN timeout 30 snow-chibi install --impls=${SCHEME} --always-yes "(srfi 180)" || true
|
|
||||||
RUN timeout 30 snow-chibi install --impls=${SCHEME} --always-yes "(foreign c)" || true
|
|
||||||
RUN make SCHEME=${SCHEME} build install
|
|
||||||
WORKDIR /workdir
|
WORKDIR /workdir
|
||||||
RUN cp -r /build/foreign-c/foreign .
|
RUN mkdir -p srfi
|
||||||
|
RUN for srfi in 60 64 145 180; do cp /build/r7rs-srfi/srfi/${srfi}.* srfi/ && cp /build/r7rs-srfi/srfi/srfi-${srfi}.* srfi/; done
|
||||||
|
RUN if [ "${SCHEME}" = "skint" ]; then cp -r /build/r7rs-srfi/srfi/39.* srfi/; fi
|
||||||
|
RUN if [ "${SCHEME}" = "tr7" ]; then cp -r /build/r7rs-srfi/srfi/39.* srfi/; fi
|
||||||
COPY Makefile .
|
COPY Makefile .
|
||||||
COPY retropikzel retropikzel/
|
COPY retropikzel retropikzel/
|
||||||
|
|
||||||
|
|
|
||||||
13
Makefile
13
Makefile
|
|
@ -38,18 +38,20 @@ ${TMPDIR}:
|
||||||
mkdir -p ${TMPDIR}/retropikzel
|
mkdir -p ${TMPDIR}/retropikzel
|
||||||
cp -r retropikzel/${LIBRARY} ${TMPDIR}/retropikzel/
|
cp -r retropikzel/${LIBRARY} ${TMPDIR}/retropikzel/
|
||||||
cp -r retropikzel/${LIBRARY}.s* ${TMPDIR}/retropikzel/
|
cp -r retropikzel/${LIBRARY}.s* ${TMPDIR}/retropikzel/
|
||||||
|
if [ -d srfi ]; then cp -r srfi ${TMPDIR}/; fi
|
||||||
|
|
||||||
test-r6rs: ${TMPDIR}
|
test-r6rs: ${TMPDIR}
|
||||||
cd ${TMPDIR} && printf "#!r6rs\n(import (rnrs base) (rnrs control) (rnrs io simple) (rnrs files) (rnrs programs) (srfi :64) (retropikzel ${LIBRARY}))\n" > test-r6rs.sps
|
cd ${TMPDIR} && printf "#!r6rs\n(import (rnrs base) (rnrs control) (rnrs io simple) (rnrs files) (rnrs programs) (srfi :64) (retropikzel ${LIBRARY}))\n" > test-r6rs.sps
|
||||||
cat ${TESTFILE} >> ${TMPDIR}/test-r6rs.sps
|
cat ${TESTFILE} >> ${TMPDIR}/test-r6rs.sps
|
||||||
cd ${TMPDIR} && akku install chez-srfi akku-r7rs > /dev/null
|
cd ${TMPDIR} && akku install chez-srfi akku-r7rs
|
||||||
cd ${TMPDIR} && COMPILE_R7RS=${SCHEME} timeout 60 compile-scheme -I .akku/lib -o test-r6rs test-r6rs.sps
|
cd ${TMPDIR} && COMPILE_R7RS=${SCHEME} timeout 60 compile-scheme -I .akku/lib -o test-r6rs test-r6rs.sps
|
||||||
cd ${TMPDIR} && timeout 60 ./test-r6rs
|
cd ${TMPDIR} && timeout 60 ./test-r6rs
|
||||||
|
|
||||||
test-r6rs-docker: ${TMPDIR}
|
test-r6rs-docker: ${TMPDIR}
|
||||||
|
echo "Building docker image..."
|
||||||
docker build --build-arg IMAGE=${DOCKERIMG} --build-arg SCHEME=${SCHEME} --tag=scheme-library-test-${SCHEME} -f Dockerfile.test --quiet . > /dev/null
|
docker build --build-arg IMAGE=${DOCKERIMG} --build-arg SCHEME=${SCHEME} --tag=scheme-library-test-${SCHEME} -f Dockerfile.test --quiet . > /dev/null
|
||||||
docker run -v "${PWD}:/workdir" -w /workdir -t scheme-library-test-${SCHEME} \
|
docker run -t scheme-library-test-${SCHEME} \
|
||||||
sh -c "make SCHEME=${SCHEME} SNOW_CHIBI_ARGS=--always-yes LIBRARY=${LIBRARY} build install test-r6rs; chmod -R 755 ${TMPDIR}"
|
sh -c "make SCHEME=${SCHEME} SNOW_CHIBI_ARGS=--always-yes LIBRARY=${LIBRARY} test-r6rs"
|
||||||
|
|
||||||
test-r7rs: ${TMPDIR}
|
test-r7rs: ${TMPDIR}
|
||||||
cd ${TMPDIR} && echo "(import (scheme base) (scheme write) (scheme read) (scheme char) (scheme file) (scheme process-context) (srfi 64) (retropikzel ${LIBRARY}))" > test-r7rs.scm
|
cd ${TMPDIR} && echo "(import (scheme base) (scheme write) (scheme read) (scheme char) (scheme file) (scheme process-context) (srfi 64) (retropikzel ${LIBRARY}))" > test-r7rs.scm
|
||||||
|
|
@ -58,9 +60,10 @@ test-r7rs: ${TMPDIR}
|
||||||
cd ${TMPDIR} && timeout 60 ./test-r7rs
|
cd ${TMPDIR} && timeout 60 ./test-r7rs
|
||||||
|
|
||||||
test-r7rs-docker: ${TMPDIR}
|
test-r7rs-docker: ${TMPDIR}
|
||||||
|
echo "Building docker image..."
|
||||||
docker build --build-arg IMAGE=${DOCKERIMG} --build-arg SCHEME=${SCHEME} --tag=scheme-library-test-${SCHEME} -f Dockerfile.test --quiet . > /dev/null
|
docker build --build-arg IMAGE=${DOCKERIMG} --build-arg SCHEME=${SCHEME} --tag=scheme-library-test-${SCHEME} -f Dockerfile.test --quiet . > /dev/null
|
||||||
docker run -v "${PWD}:/workdir" -w /workdir -t scheme-library-test-${SCHEME} \
|
docker run -t scheme-library-test-${SCHEME} \
|
||||||
sh -c "make SCHEME=${SCHEME} SNOW_CHIBI_ARGS=--always-yes LIBRARY=${LIBRARY} build install test-r7rs; chmod -R 755 ${TMPDIR}"
|
sh -c "make SCHEME=${SCHEME} SNOW_CHIBI_ARGS=--always-yes LIBRARY=${LIBRARY} test-r7rs"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
git clean -X -f
|
git clean -X -f
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let ((any->string
|
(let ((any->string
|
||||||
(lambda (any)
|
(lambda (any)
|
||||||
(parameterize
|
(let ((port (open-output-string)))
|
||||||
((current-output-port (open-output-string)))
|
(display any port)
|
||||||
(display any)
|
(newline)
|
||||||
(get-output-string (current-output-port)))))
|
(get-output-string port))))
|
||||||
(runner (test-runner-null))
|
(runner (test-runner-null))
|
||||||
(tests (vector))
|
(tests (vector))
|
||||||
(failed-tests (vector))
|
(failed-tests (vector))
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
(cond-expand
|
(cond-expand
|
||||||
(windows "windows")
|
(windows "windows")
|
||||||
(linux "linux")
|
(linux "linux")
|
||||||
|
(guile "linux")
|
||||||
(else "other"))))
|
(else "other"))))
|
||||||
(cond-expand
|
(cond-expand
|
||||||
(capyscheme (begin (define implementation-name "capyscheme")))
|
(capyscheme (begin (define implementation-name "capyscheme")))
|
||||||
|
|
@ -40,6 +41,11 @@
|
||||||
(begin
|
(begin
|
||||||
(define (time-ms)
|
(define (time-ms)
|
||||||
(time-second (current-time)))))
|
(time-second (current-time)))))
|
||||||
|
(guile
|
||||||
|
(import (srfi 19))
|
||||||
|
(begin
|
||||||
|
(define (time-ms)
|
||||||
|
(time-second (current-time)))))
|
||||||
(else
|
(else
|
||||||
(begin
|
(begin
|
||||||
(define (time-ms) (/ (/ (current-jiffy) (jiffies-per-second)) 1000)))))
|
(define (time-ms) (/ (/ (current-jiffy) (jiffies-per-second)) 1000)))))
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
Test-runner for SRFI-64 that outputs
|
Test-runner for SRFI-64 that outputs Common Test Report Format (CTRF)
|
||||||
[Common Test Report Format](https://ctrf.io/).
|
|
||||||
|
[Common Test Report Format](https://ctrf.io/)
|
||||||
|
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue