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 \
|
||||
&& mv akku-1.1.0.amd64-linux akku
|
||||
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
|
||||
RUN make
|
||||
RUN make install
|
||||
|
|
@ -21,7 +22,8 @@ RUN git clone https://codeberg.org/foreign-c/foreign-c.git --depth=2
|
|||
ARG SCHEME=chibi
|
||||
ARG IMAGE=${SCHEME}:head
|
||||
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
|
||||
COPY --from=build /build /build
|
||||
ARG SCHEME=chibi
|
||||
|
|
@ -35,13 +37,12 @@ WORKDIR /build/akku
|
|||
RUN bash install.sh
|
||||
ENV PATH=/root/.local/bin:${PATH}
|
||||
RUN akku update
|
||||
WORKDIR /build/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
|
||||
RUN akku install chez-srfi akku-r7rs "(foreign c)"
|
||||
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 retropikzel retropikzel/
|
||||
|
||||
|
|
|
|||
13
Makefile
13
Makefile
|
|
@ -38,18 +38,20 @@ ${TMPDIR}:
|
|||
mkdir -p ${TMPDIR}/retropikzel
|
||||
cp -r retropikzel/${LIBRARY} ${TMPDIR}/retropikzel/
|
||||
cp -r retropikzel/${LIBRARY}.s* ${TMPDIR}/retropikzel/
|
||||
if [ -d srfi ]; then cp -r srfi ${TMPDIR}/; fi
|
||||
|
||||
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
|
||||
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} && timeout 60 ./test-r6rs
|
||||
|
||||
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 run -v "${PWD}:/workdir" -w /workdir -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}"
|
||||
docker run -t scheme-library-test-${SCHEME} \
|
||||
sh -c "make SCHEME=${SCHEME} SNOW_CHIBI_ARGS=--always-yes LIBRARY=${LIBRARY} test-r6rs"
|
||||
|
||||
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
|
||||
|
|
@ -58,9 +60,10 @@ test-r7rs: ${TMPDIR}
|
|||
cd ${TMPDIR} && timeout 60 ./test-r7rs
|
||||
|
||||
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 run -v "${PWD}:/workdir" -w /workdir -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}"
|
||||
docker run -t scheme-library-test-${SCHEME} \
|
||||
sh -c "make SCHEME=${SCHEME} SNOW_CHIBI_ARGS=--always-yes LIBRARY=${LIBRARY} test-r7rs"
|
||||
|
||||
clean:
|
||||
git clean -X -f
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
(lambda ()
|
||||
(let ((any->string
|
||||
(lambda (any)
|
||||
(parameterize
|
||||
((current-output-port (open-output-string)))
|
||||
(display any)
|
||||
(get-output-string (current-output-port)))))
|
||||
(let ((port (open-output-string)))
|
||||
(display any port)
|
||||
(newline)
|
||||
(get-output-string port))))
|
||||
(runner (test-runner-null))
|
||||
(tests (vector))
|
||||
(failed-tests (vector))
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
(cond-expand
|
||||
(windows "windows")
|
||||
(linux "linux")
|
||||
(guile "linux")
|
||||
(else "other"))))
|
||||
(cond-expand
|
||||
(capyscheme (begin (define implementation-name "capyscheme")))
|
||||
|
|
@ -40,6 +41,11 @@
|
|||
(begin
|
||||
(define (time-ms)
|
||||
(time-second (current-time)))))
|
||||
(guile
|
||||
(import (srfi 19))
|
||||
(begin
|
||||
(define (time-ms)
|
||||
(time-second (current-time)))))
|
||||
(else
|
||||
(begin
|
||||
(define (time-ms) (/ (/ (current-jiffy) (jiffies-per-second)) 1000)))))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
Test-runner for SRFI-64 that outputs
|
||||
[Common Test Report Format](https://ctrf.io/).
|
||||
Test-runner for SRFI-64 that outputs Common Test Report Format (CTRF)
|
||||
|
||||
[Common Test Report Format](https://ctrf.io/)
|
||||
|
||||
|
||||
Usage:
|
||||
|
|
|
|||
Loading…
Reference in New Issue