Fixes to test-r7rs
This commit is contained in:
parent
998e1c993d
commit
4e17e802fe
|
@ -20,10 +20,9 @@ COPY compile-r7rs.scm .
|
||||||
COPY test-r7rs.scm .
|
COPY test-r7rs.scm .
|
||||||
COPY libs libs
|
COPY libs libs
|
||||||
|
|
||||||
RUN make PREFIX=/opt/compile-r7rs build
|
RUN make PREFIX=/opt/compile-r7rs
|
||||||
RUN make PREFIX=/opt/compile-r7rs install
|
RUN make PREFIX=/opt/compile-r7rs install
|
||||||
|
|
||||||
FROM schemers/chibi
|
FROM debian:trixie
|
||||||
RUN apt-get update && apt-get install -y podman-docker make
|
|
||||||
COPY --from=build /opt/compile-r7rs /opt/compile-r7rs
|
COPY --from=build /opt/compile-r7rs /opt/compile-r7rs
|
||||||
ENV PATH=/opt/compile-r7rs/bin:${PATH}
|
ENV PATH=/opt/compile-r7rs/bin:${PATH}
|
||||||
|
|
20
Makefile
20
Makefile
|
@ -9,9 +9,23 @@ endif
|
||||||
|
|
||||||
STATIC_LIBS=libs.util.a libs.library-util.a libs.data.a libs.srfi-64-util.a
|
STATIC_LIBS=libs.util.a libs.library-util.a libs.data.a libs.srfi-64-util.a
|
||||||
|
|
||||||
all: build
|
all: build-static
|
||||||
|
|
||||||
build: compile-r7rs test-r7rs
|
build:
|
||||||
|
echo "#!/bin/sh" > compile-r7rs
|
||||||
|
echo "chibi-scheme -A ${PREFIX}/lib/compile-r7rs ${PREFIX}/lib/compile-r7rs/compile-r7rs.scm \"\$$@\"" >> compile-r7rs
|
||||||
|
echo "#!/bin/sh" > test-r7rs
|
||||||
|
echo "chibi-scheme -A ${PREFIX}/lib/compile-r7rs ${PREFIX}/lib/compile-r7rs/test-r7rs.scm \"\$$@\"" >> test-r7rs
|
||||||
|
|
||||||
|
build-static: compile-r7rs test-r7rs
|
||||||
|
|
||||||
|
build-docker-images: build-docker-image-debian
|
||||||
|
|
||||||
|
build-docker-image-debian:
|
||||||
|
docker build . -f Dockerfile --tag=retropikzel1/compile-r7rs
|
||||||
|
|
||||||
|
push-docker-image-debian:
|
||||||
|
docker push retropikzel1/compile-r7rs
|
||||||
|
|
||||||
libs.util.a: libs/util.sld libs/util.scm
|
libs.util.a: libs/util.sld libs/util.scm
|
||||||
csc -R r7rs -X r7rs -static -c -J -unit libs.util -o libs.util.o libs/util.sld
|
csc -R r7rs -X r7rs -static -c -J -unit libs.util -o libs.util.o libs/util.sld
|
||||||
|
@ -57,7 +71,7 @@ install:
|
||||||
cp -r libs ${PREFIX}/lib/compile-r7rs/
|
cp -r libs ${PREFIX}/lib/compile-r7rs/
|
||||||
cp compile-r7rs.scm ${PREFIX}/lib/compile-r7rs/compile-r7rs.scm
|
cp compile-r7rs.scm ${PREFIX}/lib/compile-r7rs/compile-r7rs.scm
|
||||||
install compile-r7rs ${PREFIX}/bin/compile-r7rs
|
install compile-r7rs ${PREFIX}/bin/compile-r7rs
|
||||||
cp compile-r7rs.scm ${PREFIX}/lib/compile-r7rs/test-r7rs.scm
|
cp test-r7rs.scm ${PREFIX}/lib/compile-r7rs/test-r7rs.scm
|
||||||
install test-r7rs ${PREFIX}/bin/test-r7rs
|
install test-r7rs ${PREFIX}/bin/test-r7rs
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
|
|
|
@ -29,9 +29,7 @@
|
||||||
(define output-file
|
(define output-file
|
||||||
(if (member "-o" (command-line))
|
(if (member "-o" (command-line))
|
||||||
(cadr (member "-o" (command-line)))
|
(cadr (member "-o" (command-line)))
|
||||||
(if input-file
|
"a.out"))
|
||||||
"a.out"
|
|
||||||
#f)))
|
|
||||||
|
|
||||||
(define stop-on-error?
|
(define stop-on-error?
|
||||||
(if (member "--stop-on-error" (command-line)) #t #f))
|
(if (member "--stop-on-error" (command-line)) #t #f))
|
||||||
|
@ -42,6 +40,9 @@
|
||||||
(define use-docker-head?
|
(define use-docker-head?
|
||||||
(if (member "--use-docker-head" (command-line)) #t #f))
|
(if (member "--use-docker-head" (command-line)) #t #f))
|
||||||
|
|
||||||
|
(define debug?
|
||||||
|
(if (member "--debug" (command-line)) #t #f))
|
||||||
|
|
||||||
(define schemes
|
(define schemes
|
||||||
(let ((compile-r7rs (get-environment-variable "COMPILE_R7RS")))
|
(let ((compile-r7rs (get-environment-variable "COMPILE_R7RS")))
|
||||||
(cond
|
(cond
|
||||||
|
@ -154,18 +155,29 @@
|
||||||
(for-each
|
(for-each
|
||||||
echo
|
echo
|
||||||
`("FROM debian:trixie AS build"
|
`("FROM debian:trixie AS build"
|
||||||
"RUN apt-get update && apt-get install -y git gcc wget make guile-3.0-dev libcurl4-openssl-dev"
|
"RUN apt-get update && apt-get install -y git gcc wget make guile-3.0-dev libcurl4-openssl-dev chicken-bin"
|
||||||
|
"RUN chicken-install r7rs"
|
||||||
"WORKDIR /cache"
|
"WORKDIR /cache"
|
||||||
"RUN git clone https://github.com/ashinn/chibi-scheme.git --depth=1"
|
|
||||||
"RUN wget https://gitlab.com/-/project/6808260/uploads/819fd1f988c6af5e7df0dfa70aa3d3fe/akku-1.1.0.tar.gz && tar -xf akku-1.1.0.tar.gz"
|
|
||||||
"RUN mv akku-1.1.0 akku"
|
|
||||||
|
|
||||||
|
"RUN git clone https://github.com/ashinn/chibi-scheme.git --depth=1"
|
||||||
"WORKDIR /cache/chibi-scheme"
|
"WORKDIR /cache/chibi-scheme"
|
||||||
"RUN make"
|
"RUN make"
|
||||||
|
"RUN make install"
|
||||||
|
|
||||||
|
"WORKDIR /cache"
|
||||||
|
"RUN wget https://gitlab.com/-/project/6808260/uploads/819fd1f988c6af5e7df0dfa70aa3d3fe/akku-1.1.0.tar.gz && tar -xf akku-1.1.0.tar.gz"
|
||||||
|
"RUN mv akku-1.1.0 akku"
|
||||||
"WORKDIR /cache/akku"
|
"WORKDIR /cache/akku"
|
||||||
"RUN ./configure && make"
|
"RUN ./configure && make"
|
||||||
|
|
||||||
|
"WORKDIR /cache"
|
||||||
|
"RUN snow-chibi install --always-yes --impls=chicken \"(foreign c)\""
|
||||||
|
"RUN snow-chibi install --always-yes --impls=chicken \"(retropikzel system)\""
|
||||||
|
"RUN snow-chibi install --always-yes --impls=chicken \"(srfi 170)\""
|
||||||
|
"RUN git clone https://gitea.scheme.org/Retropikzel/compile-r7rs.git --depth=1"
|
||||||
|
"WORKDIR /cache/compile-r7rs"
|
||||||
|
"RUN make"
|
||||||
|
|
||||||
,(string-append "FROM schemers/"
|
,(string-append "FROM schemers/"
|
||||||
scheme
|
scheme
|
||||||
(cond ((and (string=? scheme "chicken")
|
(cond ((and (string=? scheme "chicken")
|
||||||
|
@ -174,7 +186,7 @@
|
||||||
(use-docker-head? ":head")
|
(use-docker-head? ":head")
|
||||||
(else "")))
|
(else "")))
|
||||||
,(string-append
|
,(string-append
|
||||||
"RUN apt-get update && apt-get install -y make guile-3.0 libcurl4-openssl-dev " apt-pkgs)
|
"RUN apt-get update && apt-get install -y make guile-3.0 libcurl4-openssl-dev time tree file " apt-pkgs)
|
||||||
"RUN mkdir -p ${HOME}/.snow && echo \"()\" > ${HOME}/.snow/config.scm"
|
"RUN mkdir -p ${HOME}/.snow && echo \"()\" > ${HOME}/.snow/config.scm"
|
||||||
|
|
||||||
"COPY --from=build /cache /cache"
|
"COPY --from=build /cache /cache"
|
||||||
|
@ -189,6 +201,9 @@
|
||||||
"WORKDIR /cache/akku"
|
"WORKDIR /cache/akku"
|
||||||
"RUN make install"
|
"RUN make install"
|
||||||
|
|
||||||
|
"WORKDIR /cache/compile-r7rs"
|
||||||
|
"RUN make install"
|
||||||
|
|
||||||
"WORKDIR /akku"
|
"WORKDIR /akku"
|
||||||
|
|
||||||
"RUN akku update"
|
"RUN akku update"
|
||||||
|
@ -199,8 +214,8 @@
|
||||||
dockerfile-path))
|
dockerfile-path))
|
||||||
|
|
||||||
(define (docker-run-cmd tag cmd)
|
(define (docker-run-cmd tag cmd)
|
||||||
(string-append "docker run -it -v \"${PWD}:/workdir\" --workdir /workdir "
|
(string-append "docker run -i -v \"${PWD}:/workdir\" --workdir /workdir "
|
||||||
tag " sh -c \"timeout " timeout " " cmd "\""))
|
tag " sh -c \"time timeout " timeout " " cmd "\""))
|
||||||
|
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (path) (when (not (file-exists? path)) (create-directory path)))
|
(lambda (path) (when (not (file-exists? path)) (create-directory path)))
|
||||||
|
@ -255,7 +270,7 @@
|
||||||
(docker-build-out
|
(docker-build-out
|
||||||
(string-append ".test-r7rs/tmp/" scheme "-last-docker-build"))
|
(string-append ".test-r7rs/tmp/" scheme "-last-docker-build"))
|
||||||
(docker-build-cmd
|
(docker-build-cmd
|
||||||
(string-append "docker build"
|
(string-append "docker build . "
|
||||||
" -f " dockerfile-path
|
" -f " dockerfile-path
|
||||||
" --tag=" docker-tag
|
" --tag=" docker-tag
|
||||||
" > " docker-build-out " 2>&1"))
|
" > " docker-build-out " 2>&1"))
|
||||||
|
@ -309,18 +324,11 @@
|
||||||
(system (string-append "mv " docker-build-out " " scheme-docker-build-out " > /dev/null 2>&1"))
|
(system (string-append "mv " docker-build-out " " scheme-docker-build-out " > /dev/null 2>&1"))
|
||||||
(system (string-append "mv " build-out " " scheme-build-out " > /dev/null 2>&1"))
|
(system (string-append "mv " build-out " " scheme-build-out " > /dev/null 2>&1"))
|
||||||
(system (string-append "mv " run-out " " scheme-run-out " > /dev/null 2>&1"))
|
(system (string-append "mv " run-out " " scheme-run-out " > /dev/null 2>&1"))
|
||||||
|
|
||||||
(when (not (string=? testname ""))
|
(when (not (string=? testname ""))
|
||||||
(system (string-append "mv " logfile " " scheme-results-out " > /dev/null 2>&1")))
|
(system (string-append "mv " logfile " " scheme-results-out " > /dev/null 2>&1")))
|
||||||
|
|
||||||
(echo
|
(echo (make-row (list passes unexpected-passes failures expected-failures skipped build-exit-code run-exit-code)))
|
||||||
(make-row
|
|
||||||
(list passes
|
|
||||||
unexpected-passes
|
|
||||||
failures
|
|
||||||
expected-failures
|
|
||||||
skipped
|
|
||||||
build-exit-code
|
|
||||||
run-exit-code)))
|
|
||||||
|
|
||||||
(when stop-on-error?
|
(when stop-on-error?
|
||||||
(when (not (string=? build-exit-code "0"))
|
(when (not (string=? build-exit-code "0"))
|
||||||
|
|
Loading…
Reference in New Issue