Improve Jenkins tests
This commit is contained in:
parent
45d848c79d
commit
74f4539718
|
|
@ -32,15 +32,17 @@ pipeline {
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Test R6RS Debian') {
|
parallel {
|
||||||
steps {
|
stage('Test R6RS Debian') {
|
||||||
script {
|
steps {
|
||||||
env.LIBRARIES.split().each { LIBRARY ->
|
script {
|
||||||
stage("${LIBRARY}") {
|
env.LIBRARIES.split().each { LIBRARY ->
|
||||||
env.R6RS_SCHEMES.split().each { SCHEME ->
|
stage("${LIBRARY}") {
|
||||||
stage("${SCHEME}") {
|
env.R6RS_SCHEMES.split().each { SCHEME ->
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
stage("${SCHEME}") {
|
||||||
sh "make SCHEME=${SCHEME} LIBRARY=${LIBRARY} RNRS=r6rs test-docker"
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=${SCHEME} LIBRARY=${LIBRARY} RNRS=r6rs test-docker"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -48,16 +50,16 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
stage('Test R7RS Debian') {
|
||||||
stage('Test R7RS Debian') {
|
steps {
|
||||||
steps {
|
script {
|
||||||
script {
|
env.LIBRARIES.split().each { LIBRARY ->
|
||||||
env.LIBRARIES.split().each { LIBRARY ->
|
stage("${LIBRARY}") {
|
||||||
stage("${LIBRARY}") {
|
env.R7RS_SCHEMES.split().each { SCHEME ->
|
||||||
env.R7RS_SCHEMES.split().each { SCHEME ->
|
stage("${SCHEME}") {
|
||||||
stage("${SCHEME}") {
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
sh "make SCHEME=${SCHEME} LIBRARY=${LIBRARY} RNRS=r7rs test-docker"
|
||||||
sh "make SCHEME=${SCHEME} LIBRARY=${LIBRARY} RNRS=r7rs test-docker"
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
26
Makefile
26
Makefile
|
|
@ -3,6 +3,7 @@ DOCKER_TAG=head
|
||||||
RNRS=r7rs
|
RNRS=r7rs
|
||||||
LIBRARY=system
|
LIBRARY=system
|
||||||
AUTHOR=Retropikzel
|
AUTHOR=Retropikzel
|
||||||
|
tmpdir=.tmp/${SCHEME}/${LIBRARY}
|
||||||
|
|
||||||
SFX=scm
|
SFX=scm
|
||||||
LIB_PATHS=
|
LIB_PATHS=
|
||||||
|
|
@ -41,27 +42,26 @@ install:
|
||||||
snow-chibi install --impls=${SCHEME} --always-yes ${PKG}
|
snow-chibi install --impls=${SCHEME} --always-yes ${PKG}
|
||||||
|
|
||||||
testfiles: ${PKG}
|
testfiles: ${PKG}
|
||||||
rm -rf .tmp
|
rm -rf ${tmpdir}
|
||||||
mkdir -p .tmp
|
mkdir -p ${tmpdir}
|
||||||
cp -r test-resources .tmp/
|
cp -r test-resources ${tmpdir}
|
||||||
if [ "${RNRS}" = "${R6RS}" ]; then cp -r retropikzel .tmp/; fi
|
|
||||||
# R6RS testfiles
|
# R6RS testfiles
|
||||||
printf "#!r6rs\n(import (except (rnrs) remove) (srfi :64) (foreign c) (retropikzel ${LIBRARY}))" > .tmp/test.sps
|
printf "#!r6rs\n(import (except (rnrs) remove) (srfi :64) (foreign c) (retropikzel ${LIBRARY}))" > ${tmpdir}/test.sps
|
||||||
cat ${TESTFILE} >> .tmp/test.sps
|
cat ${TESTFILE} >> ${tmpdir}/test.sps
|
||||||
# R7RS testfiles
|
# R7RS testfiles
|
||||||
echo "(import (scheme base) (scheme write) (scheme read) (scheme char) (scheme file) (scheme process-context) (srfi 64) (foreign c) (retropikzel ${LIBRARY}))" > .tmp/test.scm
|
echo "(import (scheme base) (scheme write) (scheme read) (scheme char) (scheme file) (scheme process-context) (srfi 64) (foreign c) (retropikzel ${LIBRARY}))" > ${tmpdir}/test.scm
|
||||||
cat ${TESTFILE} >> .tmp/test.scm
|
cat ${TESTFILE} >> ${tmpdir}/test.scm
|
||||||
cp ${PKG} .tmp/
|
cp ${PKG} ${tmpdir}
|
||||||
|
|
||||||
test: testfiles
|
test: testfiles
|
||||||
cd .tmp && \
|
cd ${tmpdir} && \
|
||||||
COMPILE_R7RS=${SCHEME} \
|
COMPILE_R7RS=${SCHEME} \
|
||||||
CSC_OPTIONS="${CSC_OPTIONS}" \
|
CSC_OPTIONS="${CSC_OPTIONS}" \
|
||||||
compile-r7rs ${LIB_PATHS} -o test-program test.${SFX}
|
compile-r7rs ${LIB_PATHS} -o test-program test.${SFX}
|
||||||
cd .tmp && ./test-program
|
cd ${tmpdir} && ./test-program
|
||||||
|
|
||||||
test-docker: testfiles
|
test-docker: testfiles
|
||||||
cd .tmp && \
|
cd ${tmpdir} && \
|
||||||
TEST_R7RS_DEBUG=1 \
|
TEST_R7RS_DEBUG=1 \
|
||||||
DOCKER_TAG=${DOCKER_TAG} \
|
DOCKER_TAG=${DOCKER_TAG} \
|
||||||
COMPILE_R7RS=${SCHEME} \
|
COMPILE_R7RS=${SCHEME} \
|
||||||
|
|
@ -70,7 +70,7 @@ test-docker: testfiles
|
||||||
AKKU_PACKAGES="akku-r7rs" \
|
AKKU_PACKAGES="akku-r7rs" \
|
||||||
APT_PACKAGES="${APT_PACKAGES}" \
|
APT_PACKAGES="${APT_PACKAGES}" \
|
||||||
PASS_ENV_VARS="CSC_OPTIONS" \
|
PASS_ENV_VARS="CSC_OPTIONS" \
|
||||||
test-r7rs -o test-program test.${SFX}
|
test-r7rs -o test-program ${LIB_PATHS} test.${SFX}
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
git clean -X -f
|
git clean -X -f
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue