From 4bea79ba4ac10fe27d09bea3cb9d708a8acba536 Mon Sep 17 00:00:00 2001 From: retropikzel Date: Mon, 26 Jan 2026 17:57:12 +0200 Subject: [PATCH] Fixing testing --- Jenkinsfile | 6 ++++-- Makefile | 35 +++++++++++++++++++++++++++-------- compile-test.scm | 2 +- compile-test.sps | 2 +- test.scm | 2 +- test.sps | 2 +- 6 files changed, 35 insertions(+), 14 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0b5450f..b132805 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,7 +29,8 @@ pipeline { params.R6RS_SCHEMES.split().each { SCHEME -> stage("${SCHEME}") { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { - sh "make SCHEME=${SCHEME} test-r6rs-docker | grep 'scheme-venv-test-success-Hello' || exit 1" + sh "make SCHEME=${SCHEME} test-r6rs-script-docker | grep 'scheme-venv-script-test-success-Hello' || exit 1" + sh "make SCHEME=${SCHEME} test-r6rs-compile-docker | grep 'scheme-venv-compile-test-success-Hello' || exit 1" } } } @@ -42,7 +43,8 @@ pipeline { params.R7RS_SCHEMES.split().each { SCHEME -> stage("${SCHEME}") { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { - sh "make SCHEME=${SCHEME} test-r7rs-docker | grep 'scheme-venv-test-success' || exit 1" + sh "make SCHEME=${SCHEME} test-r7rs-script-docker | grep 'scheme-venv-script-test-success' || exit 1" + sh "make SCHEME=${SCHEME} test-r7rs-compile-docker | grep 'scheme-venv-compile-test-success' || exit 1" } } } diff --git a/Makefile b/Makefile index 02fde33..1f69cc2 100644 --- a/Makefile +++ b/Makefile @@ -6,22 +6,35 @@ all: build build: @echo "No build step, just install" -test-r6rs: +test-r6rs-script: + @echo "Starting test Scheme: ${SCHEME}, RNRS: R6RS" + @rm -rf testvenv/ \ + && ./scheme-venv ${SCHEME} r6rs testvenv \ + && ./testvenv/bin/snow-chibi install --always-yes retropikzel.hello \ + && ./testvenv/bin/akku install akku-r7rs \ + && SCHEME_VENV_DEBUG=1 ./testvenv/bin/scheme-script test.sps + +test-r6rs-compile: @echo "Starting test Scheme: ${SCHEME}, RNRS: R6RS" @rm -rf testvenv/ \ && ./scheme-venv ${SCHEME} r6rs testvenv \ && ./testvenv/bin/snow-chibi install --always-yes retropikzel.hello \ && ./testvenv/bin/akku install akku-r7rs \ - && SCHEME_VENV_DEBUG=1 ./testvenv/bin/scheme-script test.sps \ && SCHEME_VENV_DEBUG=1 ./testvenv/bin/scheme-compile compile-test.sps \ && ./compile-test -test-r7rs: +test-r7rs-script: + @echo "Starting test Scheme: ${SCHEME}, RNRS: R7RS" + @rm -rf testvenv/ \ + && ./scheme-venv ${SCHEME} r7rs testvenv \ + && ./testvenv/bin/snow-chibi install --always-yes retropikzel.hello srfi.64 \ + && SCHEME_VENV_DEBUG=1 ./testvenv/bin/scheme-script test.scm + +test-r7rs-compile: @echo "Starting test Scheme: ${SCHEME}, RNRS: R7RS" @rm -rf testvenv/ \ && ./scheme-venv ${SCHEME} r7rs testvenv \ && ./testvenv/bin/snow-chibi install --always-yes retropikzel.hello srfi.64 \ - && SCHEME_VENV_DEBUG=1 ./testvenv/bin/scheme-script test.scm \ && SCHEME_VENV_DEBUG=1 ./testvenv/bin/scheme-compile compile-test.scm \ && ./compile-test @@ -32,11 +45,17 @@ build-test-docker-image: docker build --build-arg IMG=${SCHEME}:head -f Dockerfile.test --tag=scheme-venv-test-${SCHEME} . ; \ fi -test-r6rs-docker: build-test-docker-image - @docker run scheme-venv-test-${SCHEME} bash -c "make SCHEME=${SCHEME} test-r6rs" +test-r6rs-script-docker: build-test-docker-image + @docker run scheme-venv-test-${SCHEME} bash -c "make SCHEME=${SCHEME} test-r6rs-script" -test-r7rs-docker: build-test-docker-image - @docker run scheme-venv-test-${SCHEME} bash -c "make SCHEME=${SCHEME} test-r7rs" +test-r6rs-compile-docker: build-test-docker-image + @docker run scheme-venv-test-${SCHEME} bash -c "make SCHEME=${SCHEME} test-r6rs-compile" + +test-r7rs-script-docker: build-test-docker-image + @docker run scheme-venv-test-${SCHEME} bash -c "make SCHEME=${SCHEME} test-r7rs-script" + +test-r7rs-compile-docker: build-test-docker-image + @docker run scheme-venv-test-${SCHEME} bash -c "make SCHEME=${SCHEME} test-r7rs-compile" install: @mkdir -p ${PREFIX}/bin diff --git a/compile-test.scm b/compile-test.scm index e89eeb1..2f80dd0 100644 --- a/compile-test.scm +++ b/compile-test.scm @@ -4,6 +4,6 @@ (retropikzel hello) (srfi 64)) -(display "scheme-venv-test-success-") +(display "scheme-venv-compile-test-success-") (hello) (exit 0) diff --git a/compile-test.sps b/compile-test.sps index 2fd5242..7abab3c 100644 --- a/compile-test.sps +++ b/compile-test.sps @@ -4,6 +4,6 @@ (retropikzel hello) (srfi :64)) -(display "scheme-venv-test-success-") +(display "scheme-venv-compile-test-success-") (hello) (exit 0) diff --git a/test.scm b/test.scm index e89eeb1..dc27c0d 100644 --- a/test.scm +++ b/test.scm @@ -4,6 +4,6 @@ (retropikzel hello) (srfi 64)) -(display "scheme-venv-test-success-") +(display "scheme-venv-script-test-success-") (hello) (exit 0) diff --git a/test.sps b/test.sps index 2fd5242..42e2ba4 100644 --- a/test.sps +++ b/test.sps @@ -4,6 +4,6 @@ (retropikzel hello) (srfi :64)) -(display "scheme-venv-test-success-") +(display "scheme-venv-script-test-success-") (hello) (exit 0)