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