Fix testing

This commit is contained in:
retropikzel 2026-02-12 15:01:53 +02:00
parent c96d733443
commit 273a1644c5
3 changed files with 17 additions and 10 deletions

1
.gitignore vendored
View File

@ -9,4 +9,5 @@ retropikzel/*/README.html
foreign foreign
venv venv
tmp tmp
run-test*

6
Jenkinsfile vendored
View File

@ -55,4 +55,10 @@ pipeline {
} }
} }
} }
post {
success {
archiveArtifacts(artifacts: '*.json', allowEmptyArchive: true, fingerprint: true)
}
}
} }

View File

@ -53,12 +53,12 @@ run-test-venv: build
./venv/test ./venv/test
run-test-system: build run-test-system: build
mkdir -p tmp printf "#!r6rs\n(import (rnrs) (srfi :64) (srfi :98) (retropikzel mouth) (retropikzel ${LIBRARY}))" > run-test.sps
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))" >> run-test.sps
echo "(test-runner-current (ctrf-runner))" >> tmp/test.scm cat ${TESTFILE} >> run-test.sps
printf "#!r6rs\n(import (rnrs) (srfi :64) (srfi :98) (retropikzel mouth) (retropikzel ${LIBRARY}))" > tmp/test.sps echo "(import (scheme base) (scheme write) (scheme read) (scheme char) (scheme file) (scheme process-context) (retropikzel mouth) (srfi 64) (retropikzel ctrf) (retropikzel ${LIBRARY}))" > run-test.scm
cat ${TESTFILE} >> tmp/test.scm echo "(test-runner-current (ctrf-runner))" >> run-test.scm
cat ${TESTFILE} >> tmp/test.sps cat ${TESTFILE} >> run-test.scm
if [ "${RNRS}" = "r7rs" ]; then snow-chibi install --always-yes srfi.64; fi if [ "${RNRS}" = "r7rs" ]; then snow-chibi install --always-yes srfi.64; fi
if [ "${RNRS}" = "r7rs" ]; then snow-chibi install retropikzel.mouth; fi if [ "${RNRS}" = "r7rs" ]; then snow-chibi install retropikzel.mouth; fi
if [ "${RNRS}" = "r7rs" ]; then printf "1\n1\n" | snow-chibi install retropikzel.ctrf; fi if [ "${RNRS}" = "r7rs" ]; then printf "1\n1\n" | snow-chibi install retropikzel.ctrf; fi
@ -69,13 +69,13 @@ run-test-system: build
if [ "${RNRS}" = "r6rs" ]; then akku install; fi if [ "${RNRS}" = "r6rs" ]; then akku install; fi
if [ "${SCHEME}-${RNRS}" = "mosh-r7rs" ]; then snow-chibi install --always-yes srfi.64; fi if [ "${SCHEME}-${RNRS}" = "mosh-r7rs" ]; then snow-chibi install --always-yes srfi.64; fi
if [ "${RNRS}" = "r7rs" ]; then snow-chibi install ${PKG}; fi if [ "${RNRS}" = "r7rs" ]; then snow-chibi install ${PKG}; fi
if [ "${RNRS}" = "r6rs" ]; then COMPILE_SCHEME=${SCHEME} compile-scheme tmp/test.sps; fi if [ "${RNRS}" = "r6rs" ]; then COMPILE_SCHEME=${SCHEME} compile-scheme run-test.sps; fi
if [ "${RNRS}" = "r7rs" ]; then COMPILE_SCHEME=${SCHEME} CSC_OPTIONS="-L -lcurl" compile-scheme tmp/test.scm; fi if [ "${RNRS}" = "r7rs" ]; then COMPILE_SCHEME=${SCHEME} CSC_OPTIONS="-L -lcurl" compile-scheme run-test.scm; fi
./tmp/test ./run-test
run-test-docker: run-test-docker:
docker build --build-arg IMAGE=${DOCKERIMG} -f Dockerfile.test --tag=scheme-libraries-${SCHEME}-${RNRS} . docker build --build-arg IMAGE=${DOCKERIMG} -f Dockerfile.test --tag=scheme-libraries-${SCHEME}-${RNRS} .
docker run scheme-libraries-${SCHEME}-${RNRS} sh -c "make SCHEME=${SCHEME} RNRS=${RNRS} LIBRARY=${LIBRARY} run-test-system ; chmod 755 *.json" docker run -v "${PWD}:/workdir" -w /workdir scheme-libraries-${SCHEME}-${RNRS} sh -c "make SCHEME=${SCHEME} RNRS=${RNRS} LIBRARY=${LIBRARY} run-test-system ; chmod 755 *.json"
clean: clean:
git clean -X -f git clean -X -f