diff --git a/Jenkinsfile b/Jenkinsfile index 53580a9..f9d4018 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,15 +1,3 @@ -def implementations = [ - 'chibi', - 'chicken', - 'gauche', - 'guile', - 'kawa', - 'mosh', - 'racket', - 'sagittarius', - 'stklos', - 'ypsilon' -] def tests = ['primitives', 'addressof', 'callback'] pipeline { @@ -24,6 +12,8 @@ pipeline { stage('Tests') { steps { script { + def implementations = sh(script: 'docker run retropikzel1/compile-r7rs:chibi sh -c "compile-r7rs --list-r7rs-schemes"', returnStdout: true) + implementations.each { implementation-> tests.each { test -> stage("${implementation} ${test}") { diff --git a/Makefile b/Makefile index a8fe1d0..80bdfbf 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ CC=gcc DOCKER=docker run -it -v ${PWD}:/workdir DOCKER_INIT=cd /workdir && make clean && VERSION=$(shell grep "version:" README.md | awk '{split\($0,a\); print a[2];}') +TESTNAME=primitives test-compile-r7rs: tmp/test/libtest.o tmp/test/libtest.so tmp/test/libtest.a make ${COMPILE_R7RS} @@ -11,16 +12,27 @@ test-compile-r7rs: tmp/test/libtest.o tmp/test/libtest.so tmp/test/libtest.a cp tests/c-include/libtest.h tmp/test/ cd tmp/test && \ COMPILE_R7RS_GAMBIT="-cc-options \"-ltest -I. -L\" -ld-options \"-L.\"" \ - COMPILE_R7RS_CHICKEN="-L -ltest -I. -L." \ + COMPILE_R7RS_CHICKEN="-L -static -L -ltest -I. -L." \ compile-r7rs -I . -o ${TESTNAME} ${TESTNAME}.scm + cd tmp/test && ./${TESTNAME} + +test-compile-r7rs-wine: + cp -r foreign tmp/test/ + cp tests/*.scm tmp/test/ + cp tests/c-include/libtest.h tmp/test/ + cd tmp/test && \ + wine "${HOME}/.wine/drive_c/Program Files (x86)/compile-r7rs/compile-r7rs.bat" -I . -o ${TESTNAME} ${TESTNAME}.scm cd tmp/test && \ LD_LIBRARY_PATH=. \ - ./${TESTNAME} + wine ./${TESTNAME}.bat -test-compile-r7rs-docker: +test-compile-r7rs-docker-old: docker build --build-arg COMPILE_R7RS=${COMPILE_R7RS} --tag=r7rs-pffi-test-${COMPILE_R7RS} -f Dockerfile.test . docker run -v "${PWD}:/workdir" -w /workdir -t r7rs-pffi-test-${COMPILE_R7RS} sh -c "make COMPILE_R7RS=${COMPILE_R7RS} TESTNAME=${TESTNAME} test-compile-r7rs" +test-compile-r7rs-docker: + docker run -v "${PWD}:/workdir" -w /workdir retropikzel1/compile-r7rs:${COMPILE_R7RS} sh -c "make test-compile-r7rs COMPILE_R7RS=${COMPILE_R7RS} TESTNAME=${TESTNAME}" + tmp/test/libtest.o: tests/c-src/libtest.c mkdir -p tmp/test ${CC} -o tmp/test/libtest.o -fPIC -c tests/c-src/libtest.c -I./include