Compare commits
107 Commits
main
...
new-builds
| Author | SHA1 | Date |
|---|---|---|
|
|
fd1829c9f2 | |
|
|
4e62182c00 | |
|
|
4f00dba463 | |
|
|
f308245fce | |
|
|
eff403988e | |
|
|
1d26b8e142 | |
|
|
cb21096f9c | |
|
|
eb188653e6 | |
|
|
2fe27baca0 | |
|
|
424c235b93 | |
|
|
b3c48c03a4 | |
|
|
f8a7c7a9be | |
|
|
f3ca72f8f5 | |
|
|
001ed29b4a | |
|
|
e88460ff17 | |
|
|
322d4c11a1 | |
|
|
96ad8c50c2 | |
|
|
bdac5e5d7e | |
|
|
6589b7173d | |
|
|
1143990d57 | |
|
|
7efa48a886 | |
|
|
166f918897 | |
|
|
b74bf8e8b8 | |
|
|
bb6d4f77dc | |
|
|
5088422f9d | |
|
|
6bf8d5989b | |
|
|
bde366aee3 | |
|
|
6399043fa3 | |
|
|
8cfac7fff4 | |
|
|
1ec9630ae4 | |
|
|
94d4915116 | |
|
|
e7d1f4b3d2 | |
|
|
09c16e0308 | |
|
|
667ed5242f | |
|
|
b2c362bd78 | |
|
|
a1c106fee0 | |
|
|
0b9ede5d6e | |
|
|
8134f64c6b | |
|
|
8521b07a80 | |
|
|
42c81ad668 | |
|
|
fd7e43de70 | |
|
|
adcaaa5707 | |
|
|
35fa514296 | |
|
|
4ed0038845 | |
|
|
b6ad713956 | |
|
|
17f15028ba | |
|
|
a770ec9511 | |
|
|
68c0d8294a | |
|
|
bcd01201ea | |
|
|
396298467a | |
|
|
79ce9e06d9 | |
|
|
9bbb623347 | |
|
|
1007f6437f | |
|
|
8c838e90a8 | |
|
|
620fba4e56 | |
|
|
1c2c1ccd82 | |
|
|
62084a7d39 | |
|
|
26b3f9007c | |
|
|
d9e9ea0e90 | |
|
|
154a1ca507 | |
|
|
70a022e318 | |
|
|
caa087729b | |
|
|
74f5577dfe | |
|
|
2777cfa5b0 | |
|
|
50cef9ac08 | |
|
|
86a67624d2 | |
|
|
92809b7808 | |
|
|
0098ae98e8 | |
|
|
71778bf94c | |
|
|
239ff47043 | |
|
|
a049f1ff2f | |
|
|
5c270b5d53 | |
|
|
6d41101c61 | |
|
|
b7957cdfb9 | |
|
|
9af7a8109a | |
|
|
65e5b8f149 | |
|
|
3095423e4f | |
|
|
78a820373e | |
|
|
0b6de16fb4 | |
|
|
953f619558 | |
|
|
897d8e1491 | |
|
|
af2647c669 | |
|
|
23e1118730 | |
|
|
64ea3b5ca5 | |
|
|
5ca3fc468b | |
|
|
10cd26f963 | |
|
|
7539e2331a | |
|
|
e27df2fa97 | |
|
|
641d8fc7fb | |
|
|
b44225a6ba | |
|
|
4815bb4d9a | |
|
|
acd1a25e91 | |
|
|
2f1f7e9b59 | |
|
|
b8921f60f0 | |
|
|
a248753ee2 | |
|
|
78eb7d72fa | |
|
|
ff057418a1 | |
|
|
0198cf9bdd | |
|
|
1bd0978edb | |
|
|
e09497a462 | |
|
|
c82bed7137 | |
|
|
a098c35fa1 | |
|
|
b0f51011cc | |
|
|
b8b3c80ee6 | |
|
|
4c341e74ea | |
|
|
653ee52331 | |
|
|
93f78aa11c |
|
|
@ -26,3 +26,4 @@ venv*
|
||||||
retropikzel/wasm/plus.sld
|
retropikzel/wasm/plus.sld
|
||||||
retropikzel/*.c
|
retropikzel/*.c
|
||||||
retropikzel/*.meta
|
retropikzel/*.meta
|
||||||
|
test-program
|
||||||
|
|
|
||||||
|
|
@ -1,80 +1,860 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent {
|
||||||
dockerfile {
|
label 'docker-x86_64'
|
||||||
label 'docker-x86_64'
|
}
|
||||||
filename 'Dockerfile.jenkins'
|
options {
|
||||||
args '-t --user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock'
|
disableConcurrentBuilds()
|
||||||
reuseNode true
|
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('capyscheme') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'schemers/capyscheme:head'
|
||||||
|
reuseNode true
|
||||||
|
args '--user=root'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
steps {
|
||||||
triggers {
|
script {
|
||||||
GenericTrigger(
|
get_capyscheme_stages()
|
||||||
genericVariables: [[key: 'ref', value: '$.ref']],
|
|
||||||
causeString: 'Triggered on $ref',
|
|
||||||
printContributedVariables: true,
|
|
||||||
printPostContent: true,
|
|
||||||
silentResponse: false,
|
|
||||||
shouldNotFlatten: false,
|
|
||||||
regexpFilterText: '$ref',
|
|
||||||
regexpFilterExpression: 'refs/heads/' + BRANCH_NAME
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
options {
|
|
||||||
disableConcurrentBuilds()
|
|
||||||
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
|
|
||||||
}
|
|
||||||
|
|
||||||
environment {
|
|
||||||
R6RS_SCHEMES='capyscheme chezscheme guile ikarus ironscheme loko mosh racket sagittarius ypsilon'
|
|
||||||
R7RS_SCHEMES='capyscheme chibi chicken cyclone foment gauche gambit kawa loko meevax mosh racket sagittarius skint stklos tr7 ypsilon'
|
|
||||||
LIBRARIES='tap junit debug lambda-utils ctrf mouth string url-encoding leb128 hardware-info'
|
|
||||||
}
|
|
||||||
|
|
||||||
stages {
|
|
||||||
stage('Parallel') {
|
|
||||||
parallel {
|
|
||||||
stage('R6RS tests') {
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
env.LIBRARIES.split().each { LIBRARY ->
|
|
||||||
stage("${LIBRARY}") {
|
|
||||||
env.R6RS_SCHEMES.split().each { SCHEME ->
|
|
||||||
stage("${SCHEME}") {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh "timeout 600 make SCHEME=${SCHEME} LIBRARY=${LIBRARY} RNRS=r6rs test-docker"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('R7RS tests') {
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
env.LIBRARIES.split().each { LIBRARY ->
|
|
||||||
stage("${LIBRARY}") {
|
|
||||||
env.R7RS_SCHEMES.split().each { SCHEME ->
|
|
||||||
stage("${SCHEME}") {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh "timeout 600 make SCHEME=${SCHEME} LIBRARY=${LIBRARY} RNRS=r7rs test-docker"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
post {
|
stage('chibi') {
|
||||||
always {
|
agent {
|
||||||
cleanWs()
|
docker {
|
||||||
|
image 'schemers/chibi:head'
|
||||||
|
reuseNode true
|
||||||
|
args '--user=root'
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
get_chibi_stages()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
stage('chicken') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'schemers/chicken:head'
|
||||||
|
reuseNode true
|
||||||
|
args '--user=root'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
get_chicken_stages()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('foment') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'schemers/foment:head'
|
||||||
|
reuseNode true
|
||||||
|
args '--user=root'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
get_foment_stages()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('gauche') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'schemers/gauche:head'
|
||||||
|
reuseNode true
|
||||||
|
args '--user=root'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
get_gauche_stages()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('kawa') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'schemers/kawa:head'
|
||||||
|
reuseNode true
|
||||||
|
args '--user=root'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
get_kawa_stages()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('loko') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'schemers/loko:head'
|
||||||
|
reuseNode true
|
||||||
|
args '--user=root'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
get_loko_stages()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('meevax') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'schemers/meevax:head'
|
||||||
|
reuseNode true
|
||||||
|
args '--user=root'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
get_meevax_stages()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('mit-scheme') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'schemers/mit-scheme:head'
|
||||||
|
reuseNode true
|
||||||
|
args '--user=root'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
get_mit_scheme_stages()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('mosh') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'schemers/mosh:head'
|
||||||
|
reuseNode true
|
||||||
|
args '--user=root'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
get_mosh_stages()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('racket') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'schemers/racket:head'
|
||||||
|
reuseNode true
|
||||||
|
args '--user=root'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
get_racket_stages()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('sagittarius') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'schemers/sagittarius:head'
|
||||||
|
reuseNode true
|
||||||
|
args '--user=root'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
get_sagittarius_stages()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('skint') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'schemers/skint:head'
|
||||||
|
reuseNode true
|
||||||
|
args '--user=root'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
get_skint_stages()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('stklos') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'schemers/stklos:head'
|
||||||
|
reuseNode true
|
||||||
|
args '--user=root'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
get_stklos_stages()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('tr7') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'schemers/tr7:head'
|
||||||
|
reuseNode true
|
||||||
|
args '--user=root'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
get_tr7_stages()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('ypsilon') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'schemers/ypsilon:head'
|
||||||
|
reuseNode true
|
||||||
|
args '--user=root'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
get_ypsilon_stages()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def get_capyscheme_stages() {
|
||||||
|
def stages = []
|
||||||
|
stages.plus(stage('init') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "apt-get update && apt-get install -y git ca-certificates gcc make libffi-dev"
|
||||||
|
sh "git clone https://github.com/ashinn/chibi-scheme.git --depth=1 || true"
|
||||||
|
sh "make -j8 -C chibi-scheme"
|
||||||
|
sh "make -j8 -C chibi-scheme install"
|
||||||
|
sh "snow-chibi install --always-yes retropikzel.compile-r7rs"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('tap') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=capyscheme LIBRARY=tap all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('mouth') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=capyscheme LIBRARY=mouth all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('debug') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=capyscheme LIBRARY=debug all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('hardware-info') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=capyscheme LIBRARY=hardware-info all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('lambda-utils') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=capyscheme LIBRARY=lambda-utils all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return stages
|
||||||
|
}
|
||||||
|
|
||||||
|
def get_chibi_stages() {
|
||||||
|
def stages = []
|
||||||
|
stages.plus(stage('init') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "apt-get update && apt-get install -y git ca-certificates gcc make libffi-dev"
|
||||||
|
sh "git clone https://github.com/ashinn/chibi-scheme.git --depth=1 || true"
|
||||||
|
sh "make -j8 -C chibi-scheme"
|
||||||
|
sh "make -j8 -C chibi-scheme install"
|
||||||
|
sh "snow-chibi install --always-yes retropikzel.compile-r7rs"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('tap') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=chibi LIBRARY=tap all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('mouth') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=chibi LIBRARY=mouth all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('debug') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=chibi LIBRARY=debug all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('hardware-info') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=chibi LIBRARY=hardware-info all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('lambda-utils') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=chibi LIBRARY=lambda-utils all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return stages
|
||||||
|
}
|
||||||
|
|
||||||
|
def get_chicken_stages() {
|
||||||
|
def stages = []
|
||||||
|
stages.plus(stage('init') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "apt-get update && apt-get install -y git ca-certificates gcc make libffi-dev"
|
||||||
|
sh "git clone https://github.com/ashinn/chibi-scheme.git --depth=1 || true"
|
||||||
|
sh "make -j8 -C chibi-scheme"
|
||||||
|
sh "make -j8 -C chibi-scheme install"
|
||||||
|
sh "snow-chibi install --always-yes retropikzel.compile-r7rs"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('tap') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=chicken LIBRARY=tap all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('mouth') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=chicken LIBRARY=mouth all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('debug') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=chicken LIBRARY=debug all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('hardware-info') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=chicken LIBRARY=hardware-info all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('lambda-utils') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=chicken LIBRARY=lambda-utils all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return stages
|
||||||
|
}
|
||||||
|
|
||||||
|
def get_foment_stages() {
|
||||||
|
def stages = []
|
||||||
|
stages.plus(stage('init') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "apt-get update && apt-get install -y git ca-certificates gcc make libffi-dev"
|
||||||
|
sh "git clone https://github.com/ashinn/chibi-scheme.git --depth=1 || true"
|
||||||
|
sh "make -j8 -C chibi-scheme"
|
||||||
|
sh "make -j8 -C chibi-scheme install"
|
||||||
|
sh "snow-chibi install --always-yes retropikzel.compile-r7rs"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('tap') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=foment LIBRARY=tap all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('mouth') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=foment LIBRARY=mouth all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('debug') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=foment LIBRARY=debug all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('hardware-info') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=foment LIBRARY=hardware-info all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('lambda-utils') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=foment LIBRARY=lambda-utils all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return stages
|
||||||
|
}
|
||||||
|
|
||||||
|
def get_gauche_stages() {
|
||||||
|
def stages = []
|
||||||
|
stages.plus(stage('init') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "apt-get update && apt-get install -y git ca-certificates gcc make libffi-dev"
|
||||||
|
sh "git clone https://github.com/ashinn/chibi-scheme.git --depth=1 || true"
|
||||||
|
sh "make -j8 -C chibi-scheme"
|
||||||
|
sh "make -j8 -C chibi-scheme install"
|
||||||
|
sh "snow-chibi install --always-yes retropikzel.compile-r7rs"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('tap') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=gauche LIBRARY=tap all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('mouth') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=gauche LIBRARY=mouth all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('debug') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=gauche LIBRARY=debug all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('hardware-info') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=gauche LIBRARY=hardware-info all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('lambda-utils') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=gauche LIBRARY=lambda-utils all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return stages
|
||||||
|
}
|
||||||
|
|
||||||
|
def get_kawa_stages() {
|
||||||
|
def stages = []
|
||||||
|
stages.plus(stage('init') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "apt-get update && apt-get install -y git ca-certificates gcc make libffi-dev"
|
||||||
|
sh "git clone https://github.com/ashinn/chibi-scheme.git --depth=1 || true"
|
||||||
|
sh "make -j8 -C chibi-scheme"
|
||||||
|
sh "make -j8 -C chibi-scheme install"
|
||||||
|
sh "snow-chibi install --always-yes retropikzel.compile-r7rs"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('tap') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=kawa LIBRARY=tap all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('mouth') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=kawa LIBRARY=mouth all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('debug') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=kawa LIBRARY=debug all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('hardware-info') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=kawa LIBRARY=hardware-info all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('lambda-utils') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=kawa LIBRARY=lambda-utils all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return stages
|
||||||
|
}
|
||||||
|
|
||||||
|
def get_loko_stages() {
|
||||||
|
def stages = []
|
||||||
|
stages.plus(stage('init') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "apt-get update && apt-get install -y git ca-certificates gcc make libffi-dev"
|
||||||
|
sh "git clone https://github.com/ashinn/chibi-scheme.git --depth=1 || true"
|
||||||
|
sh "make -j8 -C chibi-scheme"
|
||||||
|
sh "make -j8 -C chibi-scheme install"
|
||||||
|
sh "snow-chibi install --always-yes retropikzel.compile-r7rs"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('tap') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=loko LIBRARY=tap all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('mouth') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=loko LIBRARY=mouth all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('debug') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=loko LIBRARY=debug all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('hardware-info') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=loko LIBRARY=hardware-info all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('lambda-utils') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=loko LIBRARY=lambda-utils all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return stages
|
||||||
|
}
|
||||||
|
|
||||||
|
def get_meevax_stages() {
|
||||||
|
def stages = []
|
||||||
|
stages.plus(stage('init') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "apt-get update && apt-get install -y git ca-certificates gcc make libffi-dev"
|
||||||
|
sh "git clone https://github.com/ashinn/chibi-scheme.git --depth=1 || true"
|
||||||
|
sh "make -j8 -C chibi-scheme"
|
||||||
|
sh "make -j8 -C chibi-scheme install"
|
||||||
|
sh "snow-chibi install --always-yes retropikzel.compile-r7rs"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('tap') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=meevax LIBRARY=tap all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('mouth') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=meevax LIBRARY=mouth all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('debug') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=meevax LIBRARY=debug all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('hardware-info') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=meevax LIBRARY=hardware-info all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('lambda-utils') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=meevax LIBRARY=lambda-utils all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return stages
|
||||||
|
}
|
||||||
|
|
||||||
|
def get_mit_scheme_stages() {
|
||||||
|
def stages = []
|
||||||
|
stages.plus(stage('init') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "apt-get update && apt-get install -y git ca-certificates gcc make libffi-dev"
|
||||||
|
sh "git clone https://github.com/ashinn/chibi-scheme.git --depth=1 || true"
|
||||||
|
sh "make -j8 -C chibi-scheme"
|
||||||
|
sh "make -j8 -C chibi-scheme install"
|
||||||
|
sh "snow-chibi install --always-yes retropikzel.compile-r7rs"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('tap') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=mit-scheme LIBRARY=tap all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('mouth') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=mit-scheme LIBRARY=mouth all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('debug') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=mit-scheme LIBRARY=debug all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('hardware-info') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=mit-scheme LIBRARY=hardware-info all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('lambda-utils') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=mit-scheme LIBRARY=lambda-utils all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return stages
|
||||||
|
}
|
||||||
|
|
||||||
|
def get_mosh_stages() {
|
||||||
|
def stages = []
|
||||||
|
stages.plus(stage('init') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "apt-get update && apt-get install -y git ca-certificates gcc make libffi-dev"
|
||||||
|
sh "git clone https://github.com/ashinn/chibi-scheme.git --depth=1 || true"
|
||||||
|
sh "make -j8 -C chibi-scheme"
|
||||||
|
sh "make -j8 -C chibi-scheme install"
|
||||||
|
sh "snow-chibi install --always-yes retropikzel.compile-r7rs"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('tap') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=mosh LIBRARY=tap all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('mouth') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=mosh LIBRARY=mouth all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('debug') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=mosh LIBRARY=debug all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('hardware-info') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=mosh LIBRARY=hardware-info all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('lambda-utils') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=mosh LIBRARY=lambda-utils all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return stages
|
||||||
|
}
|
||||||
|
|
||||||
|
def get_racket_stages() {
|
||||||
|
def stages = []
|
||||||
|
stages.plus(stage('init') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "apt-get update && apt-get install -y git ca-certificates gcc make libffi-dev"
|
||||||
|
sh "git clone https://github.com/ashinn/chibi-scheme.git --depth=1 || true"
|
||||||
|
sh "make -j8 -C chibi-scheme"
|
||||||
|
sh "make -j8 -C chibi-scheme install"
|
||||||
|
sh "snow-chibi install --always-yes retropikzel.compile-r7rs"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('tap') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=racket LIBRARY=tap all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('mouth') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=racket LIBRARY=mouth all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('debug') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=racket LIBRARY=debug all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('hardware-info') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=racket LIBRARY=hardware-info all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('lambda-utils') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=racket LIBRARY=lambda-utils all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return stages
|
||||||
|
}
|
||||||
|
|
||||||
|
def get_sagittarius_stages() {
|
||||||
|
def stages = []
|
||||||
|
stages.plus(stage('init') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "apt-get update && apt-get install -y git ca-certificates gcc make libffi-dev"
|
||||||
|
sh "git clone https://github.com/ashinn/chibi-scheme.git --depth=1 || true"
|
||||||
|
sh "make -j8 -C chibi-scheme"
|
||||||
|
sh "make -j8 -C chibi-scheme install"
|
||||||
|
sh "snow-chibi install --always-yes retropikzel.compile-r7rs"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('tap') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=sagittarius LIBRARY=tap all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('mouth') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=sagittarius LIBRARY=mouth all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('debug') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=sagittarius LIBRARY=debug all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('hardware-info') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=sagittarius LIBRARY=hardware-info all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('lambda-utils') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=sagittarius LIBRARY=lambda-utils all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return stages
|
||||||
|
}
|
||||||
|
|
||||||
|
def get_skint_stages() {
|
||||||
|
def stages = []
|
||||||
|
stages.plus(stage('init') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "apt-get update && apt-get install -y git ca-certificates gcc make libffi-dev"
|
||||||
|
sh "git clone https://github.com/ashinn/chibi-scheme.git --depth=1 || true"
|
||||||
|
sh "make -j8 -C chibi-scheme"
|
||||||
|
sh "make -j8 -C chibi-scheme install"
|
||||||
|
sh "snow-chibi install --always-yes retropikzel.compile-r7rs"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('tap') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=skint LIBRARY=tap all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('mouth') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=skint LIBRARY=mouth all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('debug') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=skint LIBRARY=debug all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('hardware-info') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=skint LIBRARY=hardware-info all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('lambda-utils') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=skint LIBRARY=lambda-utils all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return stages
|
||||||
|
}
|
||||||
|
|
||||||
|
def get_stklos_stages() {
|
||||||
|
def stages = []
|
||||||
|
stages.plus(stage('init') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "apt-get update && apt-get install -y git ca-certificates gcc make libffi-dev"
|
||||||
|
sh "git clone https://github.com/ashinn/chibi-scheme.git --depth=1 || true"
|
||||||
|
sh "make -j8 -C chibi-scheme"
|
||||||
|
sh "make -j8 -C chibi-scheme install"
|
||||||
|
sh "snow-chibi install --always-yes retropikzel.compile-r7rs"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('tap') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=stklos LIBRARY=tap all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('mouth') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=stklos LIBRARY=mouth all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('debug') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=stklos LIBRARY=debug all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('hardware-info') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=stklos LIBRARY=hardware-info all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('lambda-utils') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=stklos LIBRARY=lambda-utils all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return stages
|
||||||
|
}
|
||||||
|
|
||||||
|
def get_tr7_stages() {
|
||||||
|
def stages = []
|
||||||
|
stages.plus(stage('init') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "apt-get update && apt-get install -y git ca-certificates gcc make libffi-dev"
|
||||||
|
sh "git clone https://github.com/ashinn/chibi-scheme.git --depth=1 || true"
|
||||||
|
sh "make -j8 -C chibi-scheme"
|
||||||
|
sh "make -j8 -C chibi-scheme install"
|
||||||
|
sh "snow-chibi install --always-yes retropikzel.compile-r7rs"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('tap') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=tr7 LIBRARY=tap all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('mouth') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=tr7 LIBRARY=mouth all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('debug') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=tr7 LIBRARY=debug all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('hardware-info') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=tr7 LIBRARY=hardware-info all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('lambda-utils') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=tr7 LIBRARY=lambda-utils all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return stages
|
||||||
|
}
|
||||||
|
|
||||||
|
def get_ypsilon_stages() {
|
||||||
|
def stages = []
|
||||||
|
stages.plus(stage('init') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "apt-get update && apt-get install -y git ca-certificates gcc make libffi-dev"
|
||||||
|
sh "git clone https://github.com/ashinn/chibi-scheme.git --depth=1 || true"
|
||||||
|
sh "make -j8 -C chibi-scheme"
|
||||||
|
sh "make -j8 -C chibi-scheme install"
|
||||||
|
sh "snow-chibi install --always-yes retropikzel.compile-r7rs"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('tap') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=ypsilon LIBRARY=tap all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('mouth') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=ypsilon LIBRARY=mouth all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('debug') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=ypsilon LIBRARY=debug all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('hardware-info') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=ypsilon LIBRARY=hardware-info all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stages.plus(stage('lambda-utils') {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "make SCHEME=ypsilon LIBRARY=lambda-utils all install test"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return stages
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
42
Makefile
42
Makefile
|
|
@ -1,7 +1,7 @@
|
||||||
.SILENT:
|
.SILENT:
|
||||||
SCHEME=chibi
|
SCHEME=chibi
|
||||||
RNRS=r7rs
|
RNRS=r7rs
|
||||||
LIBRARY=ctrf
|
LIBRARY=tap
|
||||||
DOCKER_TAG=latest
|
DOCKER_TAG=latest
|
||||||
|
|
||||||
AUTHOR=retropikzel
|
AUTHOR=retropikzel
|
||||||
|
|
@ -12,14 +12,7 @@ LIBRARY_FILE=retropikzel/${LIBRARY}.sld
|
||||||
TESTFILE=retropikzel/${LIBRARY}/test.scm
|
TESTFILE=retropikzel/${LIBRARY}/test.scm
|
||||||
VERSION != cat retropikzel/${LIBRARY}/VERSION
|
VERSION != cat retropikzel/${LIBRARY}/VERSION
|
||||||
DESCRIPTION != head -n1 retropikzel/${LIBRARY}/README.md
|
DESCRIPTION != head -n1 retropikzel/${LIBRARY}/README.md
|
||||||
README=retropikzel/${LIBRARY}/README.html
|
DOCFILE=retropikzel/${LIBRARY}/README.html
|
||||||
|
|
||||||
AKKU_PACKAGES=""
|
|
||||||
SFX=scm
|
|
||||||
ifeq "${RNRS}" "r6rs"
|
|
||||||
SFX=sps
|
|
||||||
AKKU_PACKAGES="akku-r7rs"
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq "${SCHEME}" "capyscheme"
|
ifeq "${SCHEME}" "capyscheme"
|
||||||
DOCKER_TAG=head
|
DOCKER_TAG=head
|
||||||
|
|
@ -39,43 +32,40 @@ endif
|
||||||
all: package
|
all: package
|
||||||
|
|
||||||
package: retropikzel/${LIBRARY}/LICENSE retropikzel/${LIBRARY}/VERSION retropikzel/${LIBRARY}/README.md
|
package: retropikzel/${LIBRARY}/LICENSE retropikzel/${LIBRARY}/VERSION retropikzel/${LIBRARY}/README.md
|
||||||
echo "<pre>$$(cat retropikzel/${LIBRARY}/README.md)</pre>" > ${README}
|
echo "<pre>$$(cat retropikzel/${LIBRARY}/README.md)</pre>" > ${DOCFILE}
|
||||||
snow-chibi package \
|
snow-chibi package \
|
||||||
--always-yes \
|
--always-yes \
|
||||||
--version=${VERSION} \
|
--version=${VERSION} \
|
||||||
--authors=${AUTHOR} \
|
--authors=${AUTHOR} \
|
||||||
--doc=${README} \
|
--doc=${DOCFILE} \
|
||||||
--description="${DESCRIPTION}" \
|
--description="${DESCRIPTION}" \
|
||||||
|
--test=${TESTFILE} \
|
||||||
${LIBRARY_FILE}
|
${LIBRARY_FILE}
|
||||||
|
|
||||||
${PKG}: package
|
${PKG}: package
|
||||||
|
|
||||||
install:
|
install: ${PKG}
|
||||||
snow-chibi install --impls=${SCHEME} ${PKG}
|
snow-chibi install --impls=${SCHEME} --always-yes --install-tests?=1 --show-tests?=1 ${PKG}
|
||||||
|
|
||||||
testfiles: ${PKG} ${TESTFILE}
|
test:
|
||||||
rm -rf ${tmpdir}
|
COMPILE_R7RS=${SCHEME} compile-r7rs -o test-program ${TESTFILE}
|
||||||
mkdir -p ${tmpdir}
|
./test-program
|
||||||
cp ${PKG} ${tmpdir}
|
|
||||||
cat test-headers.${SFX} | sed 's/LIBRARY/${LIBRARY}/' > ${tmpdir}/test.${SFX}
|
|
||||||
cat ${TESTFILE} >> ${tmpdir}/test.${SFX}
|
|
||||||
|
|
||||||
test: testfiles
|
test-docker:
|
||||||
cd ${tmpdir} && COMPILE_R7RS=${SCHEME} CSC_OPIONS="-L -lcurl" compile-r7rs -o test-program test.${SFX}
|
SNOW_PACKAGES="srfi.19 srfi.64 srfi.180 retropikzel.tap ${PKG}" \
|
||||||
cd ${tmpdir} && ./test-program
|
|
||||||
|
|
||||||
test-docker: testfiles
|
|
||||||
SNOW_PACKAGES="srfi.19 srfi.64 srfi.180 ${PKG}" \
|
|
||||||
APT_PACKAGES="libcurl4-openssl-dev" \
|
APT_PACKAGES="libcurl4-openssl-dev" \
|
||||||
AKKU_PACKAGES="${AKKU_PACKAGES}" \
|
AKKU_PACKAGES="${AKKU_PACKAGES}" \
|
||||||
DOCKER_TAG=${DOCKER_TAG} \
|
DOCKER_TAG=${DOCKER_TAG} \
|
||||||
COMPILE_R7RS=${SCHEME} \
|
COMPILE_R7RS=${SCHEME} \
|
||||||
CSC_OPIONS="-L -lcurl" \
|
CSC_OPIONS="-L -lcurl" \
|
||||||
test-r7rs -o ${tmpdir}/test-program ${tmpdir}/test.${SFX}
|
test-r7rs -o test-program ${TESTFILE}
|
||||||
|
|
||||||
retropikzel/wasm/plus.wat: retropikzel/wasm/plus.c
|
retropikzel/wasm/plus.wat: retropikzel/wasm/plus.c
|
||||||
emcc -o retropikzel/wasm/plus.js retropikzel/wasm/plus.c
|
emcc -o retropikzel/wasm/plus.js retropikzel/wasm/plus.c
|
||||||
wasm-dis retropikzel/wasm/plus.wasm > retropikzel/wasm/plus.wat
|
wasm-dis retropikzel/wasm/plus.wasm > retropikzel/wasm/plus.wat
|
||||||
|
|
||||||
|
jenkinsfile: makings.scm
|
||||||
|
makings --jenkinsfile > Jenkinsfile
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
git clean -X -f
|
git clean -X -f
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
- image: schemers/chibi
|
||||||
|
stages:
|
||||||
|
- name: init
|
||||||
|
cmd: |
|
||||||
|
apt-get update && apt-get install -y git ca-certificates gcc make libffi-dev
|
||||||
|
git clone https://github.com/ashinn/chibi-scheme.git --depth=1
|
||||||
|
make -j8 -C chibi-scheme
|
||||||
|
make -j8 -C chibi-scheme install
|
||||||
|
snow-chibi install retropikzel.compile-r7rs
|
||||||
|
- name: tap
|
||||||
|
cmd: make SCHEME=chibi LIBRARY=tap all install test
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
(let ((schemes
|
||||||
|
'("capyscheme" "chibi" "chicken" "foment" "gauche" "kawa"
|
||||||
|
"loko" "meevax" "mit-scheme" "mosh" "racket" "sagittarius" "skint"
|
||||||
|
"stklos" "tr7" "ypsilon"))
|
||||||
|
(libraries
|
||||||
|
'("tap" "mouth" "debug" "hardware-info" "lambda-utils"))
|
||||||
|
(init
|
||||||
|
'("apt-get update && apt-get install -y git ca-certificates gcc make libffi-dev"
|
||||||
|
"git clone https://github.com/ashinn/chibi-scheme.git --depth=1 || true"
|
||||||
|
"make -j8 -C chibi-scheme"
|
||||||
|
"make -j8 -C chibi-scheme install"
|
||||||
|
"snow-chibi install --always-yes retropikzel.compile-r7rs"))
|
||||||
|
(library-stage
|
||||||
|
(lambda (scheme library-name)
|
||||||
|
(list (string->symbol library-name)
|
||||||
|
(string-append "timeout 60 make SCHEME="
|
||||||
|
scheme
|
||||||
|
" LIBRARY="
|
||||||
|
library-name
|
||||||
|
" all install test")))))
|
||||||
|
|
||||||
|
`((jenkinsfile
|
||||||
|
(agent "label 'docker-x86_64'")
|
||||||
|
(options "disableConcurrentBuilds()"
|
||||||
|
"buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))"))
|
||||||
|
(makings ,@(map (lambda (scheme)
|
||||||
|
`((name ,scheme)
|
||||||
|
(image ,(string-append "schemers/" scheme ":head"))
|
||||||
|
(stages
|
||||||
|
(init ,@init)
|
||||||
|
,@(map
|
||||||
|
(lambda (library-name)
|
||||||
|
(library-stage scheme library-name))
|
||||||
|
libraries))))
|
||||||
|
schemes))))
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
(define-syntax assert
|
||||||
|
(syntax-rules ()
|
||||||
|
((_ check body)
|
||||||
|
(let ((result body))
|
||||||
|
(when (not (check result))
|
||||||
|
(error "assertion error: " check body result))
|
||||||
|
result))))
|
||||||
|
|
||||||
|
(define-syntax asserts
|
||||||
|
(syntax-rules ()
|
||||||
|
((_ (check ...) body)
|
||||||
|
(let ((result body))
|
||||||
|
(when (not (check result)) (error "assertion error: " check body result)) ...
|
||||||
|
result))))
|
||||||
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
(define-library
|
||||||
|
(retropikzel assert)
|
||||||
|
(import (scheme base)
|
||||||
|
(scheme write))
|
||||||
|
(export assert
|
||||||
|
asserts)
|
||||||
|
(include "assert.scm"))
|
||||||
|
|
@ -0,0 +1,165 @@
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
||||||
|
This version of the GNU Lesser General Public License incorporates
|
||||||
|
the terms and conditions of version 3 of the GNU General Public
|
||||||
|
License, supplemented by the additional permissions listed below.
|
||||||
|
|
||||||
|
0. Additional Definitions.
|
||||||
|
|
||||||
|
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||||
|
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||||
|
General Public License.
|
||||||
|
|
||||||
|
"The Library" refers to a covered work governed by this License,
|
||||||
|
other than an Application or a Combined Work as defined below.
|
||||||
|
|
||||||
|
An "Application" is any work that makes use of an interface provided
|
||||||
|
by the Library, but which is not otherwise based on the Library.
|
||||||
|
Defining a subclass of a class defined by the Library is deemed a mode
|
||||||
|
of using an interface provided by the Library.
|
||||||
|
|
||||||
|
A "Combined Work" is a work produced by combining or linking an
|
||||||
|
Application with the Library. The particular version of the Library
|
||||||
|
with which the Combined Work was made is also called the "Linked
|
||||||
|
Version".
|
||||||
|
|
||||||
|
The "Minimal Corresponding Source" for a Combined Work means the
|
||||||
|
Corresponding Source for the Combined Work, excluding any source code
|
||||||
|
for portions of the Combined Work that, considered in isolation, are
|
||||||
|
based on the Application, and not on the Linked Version.
|
||||||
|
|
||||||
|
The "Corresponding Application Code" for a Combined Work means the
|
||||||
|
object code and/or source code for the Application, including any data
|
||||||
|
and utility programs needed for reproducing the Combined Work from the
|
||||||
|
Application, but excluding the System Libraries of the Combined Work.
|
||||||
|
|
||||||
|
1. Exception to Section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
You may convey a covered work under sections 3 and 4 of this License
|
||||||
|
without being bound by section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
2. Conveying Modified Versions.
|
||||||
|
|
||||||
|
If you modify a copy of the Library, and, in your modifications, a
|
||||||
|
facility refers to a function or data to be supplied by an Application
|
||||||
|
that uses the facility (other than as an argument passed when the
|
||||||
|
facility is invoked), then you may convey a copy of the modified
|
||||||
|
version:
|
||||||
|
|
||||||
|
a) under this License, provided that you make a good faith effort to
|
||||||
|
ensure that, in the event an Application does not supply the
|
||||||
|
function or data, the facility still operates, and performs
|
||||||
|
whatever part of its purpose remains meaningful, or
|
||||||
|
|
||||||
|
b) under the GNU GPL, with none of the additional permissions of
|
||||||
|
this License applicable to that copy.
|
||||||
|
|
||||||
|
3. Object Code Incorporating Material from Library Header Files.
|
||||||
|
|
||||||
|
The object code form of an Application may incorporate material from
|
||||||
|
a header file that is part of the Library. You may convey such object
|
||||||
|
code under terms of your choice, provided that, if the incorporated
|
||||||
|
material is not limited to numerical parameters, data structure
|
||||||
|
layouts and accessors, or small macros, inline functions and templates
|
||||||
|
(ten or fewer lines in length), you do both of the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the object code that the
|
||||||
|
Library is used in it and that the Library and its use are
|
||||||
|
covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
4. Combined Works.
|
||||||
|
|
||||||
|
You may convey a Combined Work under terms of your choice that,
|
||||||
|
taken together, effectively do not restrict modification of the
|
||||||
|
portions of the Library contained in the Combined Work and reverse
|
||||||
|
engineering for debugging such modifications, if you also do each of
|
||||||
|
the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the Combined Work that
|
||||||
|
the Library is used in it and that the Library and its use are
|
||||||
|
covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
c) For a Combined Work that displays copyright notices during
|
||||||
|
execution, include the copyright notice for the Library among
|
||||||
|
these notices, as well as a reference directing the user to the
|
||||||
|
copies of the GNU GPL and this license document.
|
||||||
|
|
||||||
|
d) Do one of the following:
|
||||||
|
|
||||||
|
0) Convey the Minimal Corresponding Source under the terms of this
|
||||||
|
License, and the Corresponding Application Code in a form
|
||||||
|
suitable for, and under terms that permit, the user to
|
||||||
|
recombine or relink the Application with a modified version of
|
||||||
|
the Linked Version to produce a modified Combined Work, in the
|
||||||
|
manner specified by section 6 of the GNU GPL for conveying
|
||||||
|
Corresponding Source.
|
||||||
|
|
||||||
|
1) Use a suitable shared library mechanism for linking with the
|
||||||
|
Library. A suitable mechanism is one that (a) uses at run time
|
||||||
|
a copy of the Library already present on the user's computer
|
||||||
|
system, and (b) will operate properly with a modified version
|
||||||
|
of the Library that is interface-compatible with the Linked
|
||||||
|
Version.
|
||||||
|
|
||||||
|
e) Provide Installation Information, but only if you would otherwise
|
||||||
|
be required to provide such information under section 6 of the
|
||||||
|
GNU GPL, and only to the extent that such information is
|
||||||
|
necessary to install and execute a modified version of the
|
||||||
|
Combined Work produced by recombining or relinking the
|
||||||
|
Application with a modified version of the Linked Version. (If
|
||||||
|
you use option 4d0, the Installation Information must accompany
|
||||||
|
the Minimal Corresponding Source and Corresponding Application
|
||||||
|
Code. If you use option 4d1, you must provide the Installation
|
||||||
|
Information in the manner specified by section 6 of the GNU GPL
|
||||||
|
for conveying Corresponding Source.)
|
||||||
|
|
||||||
|
5. Combined Libraries.
|
||||||
|
|
||||||
|
You may place library facilities that are a work based on the
|
||||||
|
Library side by side in a single library together with other library
|
||||||
|
facilities that are not Applications and are not covered by this
|
||||||
|
License, and convey such a combined library under terms of your
|
||||||
|
choice, if you do both of the following:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work based
|
||||||
|
on the Library, uncombined with any other library facilities,
|
||||||
|
conveyed under the terms of this License.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library that part of it
|
||||||
|
is a work based on the Library, and explaining where to find the
|
||||||
|
accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
6. Revised Versions of the GNU Lesser General Public License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the GNU Lesser General Public License from time to time. Such new
|
||||||
|
versions will be similar in spirit to the present version, but may
|
||||||
|
differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Library as you received it specifies that a certain numbered version
|
||||||
|
of the GNU Lesser General Public License "or any later version"
|
||||||
|
applies to it, you have the option of following the terms and
|
||||||
|
conditions either of that published version or of any later version
|
||||||
|
published by the Free Software Foundation. If the Library as you
|
||||||
|
received it does not specify a version number of the GNU Lesser
|
||||||
|
General Public License, you may choose any version of the GNU Lesser
|
||||||
|
General Public License ever published by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Library as you received it specifies that a proxy can decide
|
||||||
|
whether future versions of the GNU Lesser General Public License shall
|
||||||
|
apply, that proxy's public statement of acceptance of any version is
|
||||||
|
permanent authorization for you to choose that version for the
|
||||||
|
Library.
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
WIP
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
0.1.0
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
(import (scheme base)
|
||||||
|
(scheme write)
|
||||||
|
(scheme read)
|
||||||
|
(retropikzel tap)
|
||||||
|
(retropikzel debug)
|
||||||
|
(retropikzel assert)
|
||||||
|
(srfi 64))
|
||||||
|
|
||||||
|
(test-runner-current (tap-runner))
|
||||||
|
|
||||||
|
(test-begin "assert")
|
||||||
|
|
||||||
|
(test-equal 1 (assert number? 1))
|
||||||
|
|
||||||
|
(test-equal 'error
|
||||||
|
(guard (condition (else 'error))
|
||||||
|
(assert number? "string")))
|
||||||
|
|
||||||
|
(test-equal 1 (asserts (number? (lambda (i) (= i 1))) 1))
|
||||||
|
|
||||||
|
(test-end "assert")
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
(define debug?
|
||||||
|
(and (get-environment-variable "SCM_DEBUG")
|
||||||
|
(equal? (get-environment-variable "SCM_DEBUG") "1")))
|
||||||
|
|
||||||
(define print
|
(define print
|
||||||
(lambda args
|
(lambda args
|
||||||
(map (lambda (item) (display item (current-error-port))) args)))
|
(map (lambda (item) (display item (current-error-port))) args)))
|
||||||
|
|
@ -6,22 +10,21 @@
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
((_ obj)
|
((_ obj)
|
||||||
(begin
|
(begin
|
||||||
(print "[DEBUG] " 'obj ": " obj #\newline)
|
(when debug? (print "[DEBUG] " 'obj ": " obj #\newline))
|
||||||
obj))))
|
obj))))
|
||||||
|
|
||||||
(define-syntax debug
|
(define-syntax debug
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
((_ obj)
|
((_ obj)
|
||||||
(begin
|
(begin
|
||||||
(print "[DEBUG] " 'obj ": " obj #\newline)
|
(when debug? (print "[DEBUG] " 'obj ": " obj #\newline))
|
||||||
obj))))
|
obj))))
|
||||||
|
|
||||||
(define-syntax debug-proc
|
(define-syntax debug-proc
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
((_ proc arg ...)
|
((_ proc arg ...)
|
||||||
(begin
|
(begin
|
||||||
(print "[DEBUG] Calling: " 'proc ", arguments: " '(arg ...))
|
(when debug? (print "[DEBUG] Calling: " 'proc ", arguments: " '(arg ...)))
|
||||||
(let ((result (apply proc (list arg ...))))
|
(let ((result (apply proc (list arg ...))))
|
||||||
(print ", returned: " result #\newline)
|
(when debug? (print ", returned: " result #\newline))
|
||||||
result)))))
|
result)))))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
(define-library
|
(define-library
|
||||||
(retropikzel debug)
|
(retropikzel debug)
|
||||||
(import (scheme base)
|
(import (scheme base)
|
||||||
(scheme write))
|
(scheme write)
|
||||||
|
(scheme process-context))
|
||||||
(export debug
|
(export debug
|
||||||
debug-display
|
debug-display
|
||||||
debug-proc)
|
debug-proc)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,11 @@
|
||||||
|
(import (scheme base)
|
||||||
|
(scheme write)
|
||||||
|
(retropikzel tap)
|
||||||
|
(retropikzel debug)
|
||||||
|
(srfi 64))
|
||||||
|
|
||||||
|
(test-runner-current (tap-runner))
|
||||||
|
|
||||||
(test-begin "debug")
|
(test-begin "debug")
|
||||||
|
|
||||||
(debug 'lol)
|
(debug 'lol)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,100 @@
|
||||||
|
(define (make-lock-file-name file-name) (string-append file-name ".lock"))
|
||||||
|
(define (sleep time)
|
||||||
|
(letrec*
|
||||||
|
((end-time
|
||||||
|
(let ((end-time (current-time))
|
||||||
|
(seconds (quotient time 1000))
|
||||||
|
(nanoseconds (* (remainder time 1000) 1000000)))
|
||||||
|
(set-time-second! end-time (+ (time-second end-time) seconds))
|
||||||
|
(set-time-nanosecond! end-time (+ (time-nanosecond end-time) nanoseconds))
|
||||||
|
end-time))
|
||||||
|
(looper (lambda () (when (time<? (current-time) end-time) (looper)))))
|
||||||
|
(looper)))
|
||||||
|
|
||||||
|
(define (obtain-dot-lock file-name . args)
|
||||||
|
(let* ((interval
|
||||||
|
(* (if (>= (length args) 1)
|
||||||
|
(let ((interval (list-ref args 0)))
|
||||||
|
(when (not (integer? interval))
|
||||||
|
(error (string-append "obtain-dot-lock error: interval must"
|
||||||
|
" be integer"
|
||||||
|
interval)))
|
||||||
|
interval)
|
||||||
|
1000)))
|
||||||
|
(retry-number
|
||||||
|
(if (>= (length args) 2)
|
||||||
|
(let ((retry-number (list-ref args 1)))
|
||||||
|
(when (and (not (integer? retry-number))
|
||||||
|
(not (equal? retry-number #f)))
|
||||||
|
(error (string-append "obtain-dot-lock error: retry-number must"
|
||||||
|
" be integer or #f")
|
||||||
|
retry-number))
|
||||||
|
retry-number)
|
||||||
|
#f))
|
||||||
|
(stale-time-seconds
|
||||||
|
(if (>= (length args) 3)
|
||||||
|
(let ((stale-time (list-ref args 2)))
|
||||||
|
(when (and (not (integer? stale-time))
|
||||||
|
(not (equal? stale-time #f)))
|
||||||
|
(error (string-append "obtain-dot-lock error: stale time must"
|
||||||
|
" be integer or #f")
|
||||||
|
stale-time))
|
||||||
|
stale-time)
|
||||||
|
300))
|
||||||
|
(stale-time
|
||||||
|
(if stale-time-seconds
|
||||||
|
(add-duration (current-time time-utc)
|
||||||
|
(make-time time-duration 0 stale-time-seconds))
|
||||||
|
#f))
|
||||||
|
(lock-file-name (make-lock-file-name file-name))
|
||||||
|
(lock-time (lambda ()
|
||||||
|
(guard (condition (else #f))
|
||||||
|
(file-info:ctime (file-info lock-file-name #f))))))
|
||||||
|
(letrec
|
||||||
|
((locker
|
||||||
|
(lambda (try-count)
|
||||||
|
(cond ((not (file-exists? lock-file-name))
|
||||||
|
(guard (condition (else (locker (+ try-count 1))))
|
||||||
|
(create-hard-link file-name lock-file-name)
|
||||||
|
#t))
|
||||||
|
((and retry-number (> try-count retry-number)) #f)
|
||||||
|
((and stale-time (time>? lock-time stale-time))
|
||||||
|
(break-dot-lock file-name)
|
||||||
|
(create-hard-link file-name lock-file-name)
|
||||||
|
(guard (condition (else #f))
|
||||||
|
(create-hard-link file-name lock-file-name)
|
||||||
|
'broken))
|
||||||
|
((or (not retry-number)
|
||||||
|
(<= try-count retry-number))
|
||||||
|
(sleep interval)
|
||||||
|
(locker (+ try-count)))))))
|
||||||
|
(locker 0))))
|
||||||
|
|
||||||
|
(define (break-dot-lock file-name)
|
||||||
|
(let ((lock-file-name (make-lock-file-name file-name)))
|
||||||
|
(when (file-exists? lock-file-name) (delete-file lock-file-name))))
|
||||||
|
|
||||||
|
(define (release-dot-lock file-name)
|
||||||
|
(let ((lock-file-name (make-lock-file-name file-name)))
|
||||||
|
(guard (condition (else #f))
|
||||||
|
(when (file-exists? lock-file-name)
|
||||||
|
(delete-file lock-file-name))
|
||||||
|
#t)))
|
||||||
|
|
||||||
|
(define-syntax with-dot-lock*
|
||||||
|
(syntax-rules ()
|
||||||
|
((_ file-name thunk)
|
||||||
|
(letrec* ((locked? (obtain-dot-lock file-name))
|
||||||
|
(unlock (lambda ()
|
||||||
|
(when locked? (break-dot-lock file-name))
|
||||||
|
(set! locked? #f))))
|
||||||
|
(when locked?
|
||||||
|
(dynamic-wind (lambda () #t)
|
||||||
|
(lambda () (guard (condition (else (unlock))) (thunk)))
|
||||||
|
unlock))
|
||||||
|
(unlock)))))
|
||||||
|
|
||||||
|
(define-syntax with-dot-lock
|
||||||
|
(syntax-rules ()
|
||||||
|
((_ file-name body ...)
|
||||||
|
(with-dot-lock* file-name (lambda () body ...)))))
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
(define-library
|
||||||
|
(retropikzel dot-locking)
|
||||||
|
(import (scheme base)
|
||||||
|
(scheme write)
|
||||||
|
(scheme file)
|
||||||
|
(srfi 19)
|
||||||
|
(srfi 170))
|
||||||
|
(export obtain-dot-lock
|
||||||
|
break-dot-lock
|
||||||
|
release-dot-lock
|
||||||
|
with-dot-lock*
|
||||||
|
with-dot-lock)
|
||||||
|
(include "dot-locking.scm"))
|
||||||
|
|
@ -0,0 +1,165 @@
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
||||||
|
This version of the GNU Lesser General Public License incorporates
|
||||||
|
the terms and conditions of version 3 of the GNU General Public
|
||||||
|
License, supplemented by the additional permissions listed below.
|
||||||
|
|
||||||
|
0. Additional Definitions.
|
||||||
|
|
||||||
|
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||||
|
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||||
|
General Public License.
|
||||||
|
|
||||||
|
"The Library" refers to a covered work governed by this License,
|
||||||
|
other than an Application or a Combined Work as defined below.
|
||||||
|
|
||||||
|
An "Application" is any work that makes use of an interface provided
|
||||||
|
by the Library, but which is not otherwise based on the Library.
|
||||||
|
Defining a subclass of a class defined by the Library is deemed a mode
|
||||||
|
of using an interface provided by the Library.
|
||||||
|
|
||||||
|
A "Combined Work" is a work produced by combining or linking an
|
||||||
|
Application with the Library. The particular version of the Library
|
||||||
|
with which the Combined Work was made is also called the "Linked
|
||||||
|
Version".
|
||||||
|
|
||||||
|
The "Minimal Corresponding Source" for a Combined Work means the
|
||||||
|
Corresponding Source for the Combined Work, excluding any source code
|
||||||
|
for portions of the Combined Work that, considered in isolation, are
|
||||||
|
based on the Application, and not on the Linked Version.
|
||||||
|
|
||||||
|
The "Corresponding Application Code" for a Combined Work means the
|
||||||
|
object code and/or source code for the Application, including any data
|
||||||
|
and utility programs needed for reproducing the Combined Work from the
|
||||||
|
Application, but excluding the System Libraries of the Combined Work.
|
||||||
|
|
||||||
|
1. Exception to Section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
You may convey a covered work under sections 3 and 4 of this License
|
||||||
|
without being bound by section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
2. Conveying Modified Versions.
|
||||||
|
|
||||||
|
If you modify a copy of the Library, and, in your modifications, a
|
||||||
|
facility refers to a function or data to be supplied by an Application
|
||||||
|
that uses the facility (other than as an argument passed when the
|
||||||
|
facility is invoked), then you may convey a copy of the modified
|
||||||
|
version:
|
||||||
|
|
||||||
|
a) under this License, provided that you make a good faith effort to
|
||||||
|
ensure that, in the event an Application does not supply the
|
||||||
|
function or data, the facility still operates, and performs
|
||||||
|
whatever part of its purpose remains meaningful, or
|
||||||
|
|
||||||
|
b) under the GNU GPL, with none of the additional permissions of
|
||||||
|
this License applicable to that copy.
|
||||||
|
|
||||||
|
3. Object Code Incorporating Material from Library Header Files.
|
||||||
|
|
||||||
|
The object code form of an Application may incorporate material from
|
||||||
|
a header file that is part of the Library. You may convey such object
|
||||||
|
code under terms of your choice, provided that, if the incorporated
|
||||||
|
material is not limited to numerical parameters, data structure
|
||||||
|
layouts and accessors, or small macros, inline functions and templates
|
||||||
|
(ten or fewer lines in length), you do both of the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the object code that the
|
||||||
|
Library is used in it and that the Library and its use are
|
||||||
|
covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
4. Combined Works.
|
||||||
|
|
||||||
|
You may convey a Combined Work under terms of your choice that,
|
||||||
|
taken together, effectively do not restrict modification of the
|
||||||
|
portions of the Library contained in the Combined Work and reverse
|
||||||
|
engineering for debugging such modifications, if you also do each of
|
||||||
|
the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the Combined Work that
|
||||||
|
the Library is used in it and that the Library and its use are
|
||||||
|
covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
c) For a Combined Work that displays copyright notices during
|
||||||
|
execution, include the copyright notice for the Library among
|
||||||
|
these notices, as well as a reference directing the user to the
|
||||||
|
copies of the GNU GPL and this license document.
|
||||||
|
|
||||||
|
d) Do one of the following:
|
||||||
|
|
||||||
|
0) Convey the Minimal Corresponding Source under the terms of this
|
||||||
|
License, and the Corresponding Application Code in a form
|
||||||
|
suitable for, and under terms that permit, the user to
|
||||||
|
recombine or relink the Application with a modified version of
|
||||||
|
the Linked Version to produce a modified Combined Work, in the
|
||||||
|
manner specified by section 6 of the GNU GPL for conveying
|
||||||
|
Corresponding Source.
|
||||||
|
|
||||||
|
1) Use a suitable shared library mechanism for linking with the
|
||||||
|
Library. A suitable mechanism is one that (a) uses at run time
|
||||||
|
a copy of the Library already present on the user's computer
|
||||||
|
system, and (b) will operate properly with a modified version
|
||||||
|
of the Library that is interface-compatible with the Linked
|
||||||
|
Version.
|
||||||
|
|
||||||
|
e) Provide Installation Information, but only if you would otherwise
|
||||||
|
be required to provide such information under section 6 of the
|
||||||
|
GNU GPL, and only to the extent that such information is
|
||||||
|
necessary to install and execute a modified version of the
|
||||||
|
Combined Work produced by recombining or relinking the
|
||||||
|
Application with a modified version of the Linked Version. (If
|
||||||
|
you use option 4d0, the Installation Information must accompany
|
||||||
|
the Minimal Corresponding Source and Corresponding Application
|
||||||
|
Code. If you use option 4d1, you must provide the Installation
|
||||||
|
Information in the manner specified by section 6 of the GNU GPL
|
||||||
|
for conveying Corresponding Source.)
|
||||||
|
|
||||||
|
5. Combined Libraries.
|
||||||
|
|
||||||
|
You may place library facilities that are a work based on the
|
||||||
|
Library side by side in a single library together with other library
|
||||||
|
facilities that are not Applications and are not covered by this
|
||||||
|
License, and convey such a combined library under terms of your
|
||||||
|
choice, if you do both of the following:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work based
|
||||||
|
on the Library, uncombined with any other library facilities,
|
||||||
|
conveyed under the terms of this License.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library that part of it
|
||||||
|
is a work based on the Library, and explaining where to find the
|
||||||
|
accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
6. Revised Versions of the GNU Lesser General Public License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the GNU Lesser General Public License from time to time. Such new
|
||||||
|
versions will be similar in spirit to the present version, but may
|
||||||
|
differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Library as you received it specifies that a certain numbered version
|
||||||
|
of the GNU Lesser General Public License "or any later version"
|
||||||
|
applies to it, you have the option of following the terms and
|
||||||
|
conditions either of that published version or of any later version
|
||||||
|
published by the Free Software Foundation. If the Library as you
|
||||||
|
received it does not specify a version number of the GNU Lesser
|
||||||
|
General Public License, you may choose any version of the GNU Lesser
|
||||||
|
General Public License ever published by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Library as you received it specifies that a proxy can decide
|
||||||
|
whether future versions of the GNU Lesser General Public License shall
|
||||||
|
apply, that proxy's public statement of acceptance of any version is
|
||||||
|
permanent authorization for you to choose that version for the
|
||||||
|
Library.
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
Dot locking for files
|
||||||
|
|
||||||
|
This is an implementation of dot-locking from [scsh](https://scsh.net/).
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
From [https://scsh.net/docu/html/man-Z-H-11.html#node_sec_10.3](https://scsh.net/docu/html/man-Z-H-11.html#node_sec_10.3)
|
||||||
|
|
||||||
|
Copied here for convenience.
|
||||||
|
|
||||||
|
|
||||||
|
(__obtain-dot-lock__ file-name)
|
||||||
|
|
||||||
|
Tries to obtain the lock for file-name. If the file is already locked, the thread
|
||||||
|
sleeps for interval seconds (default is 1) before it retries. If the lock cannot
|
||||||
|
be obtained after retry-number attempts, the procedure returns #f, other-
|
||||||
|
wise #t. The default value of retry-number is #f which corresponds to an
|
||||||
|
infinite number of retires.
|
||||||
|
If stale-time is non-#f, it specifies the minimum age a lock may have
|
||||||
|
(in seconds) before it is considered stale. Obtain-dot-lock attempts to
|
||||||
|
delete stale locks. If it was succcessful obtaining a lock after breaking
|
||||||
|
it, obtain-dot-lock returns broken. If stale-time is #f, obtain-dot-lock
|
||||||
|
never considers a lock stale. The default for stale-time is 300.
|
||||||
|
Note that it is possible that obtain-dot-lock breaks a lock but never-
|
||||||
|
theless fails to obtain it otherwise. If it is necessary to handle this case
|
||||||
|
specially, use break-dot-lock directly (see below) rather than specifying
|
||||||
|
a non-#f stale-time
|
||||||
|
|
||||||
|
|
||||||
|
(__break-dot-lock__ file-name)
|
||||||
|
|
||||||
|
Breaks the lock for file-name if one exists. Note that breaking a lock
|
||||||
|
does not imply a subsequent obtain-dot-lock will succeed, as an-
|
||||||
|
other party may have acquired the lock between break-dot-lock and
|
||||||
|
obtain-dot-lock.
|
||||||
|
|
||||||
|
|
||||||
|
(__release-dot-lock__ file-name)
|
||||||
|
|
||||||
|
Releases the lock for file-name. On success, release-dot-lock returns #t,
|
||||||
|
otherwise #f. Note that this procedure can also be used to break the lock
|
||||||
|
for file-name.
|
||||||
|
|
||||||
|
|
||||||
|
(__with-dot-lock*__ file-name thunk)
|
||||||
|
(__with-dot-lock__ file-name body ...)
|
||||||
|
|
||||||
|
The procedure with-dot-lock* obtains the requested lock, and then calls
|
||||||
|
(thunk). When thunk returns, the lock is released. A non-local exit (e.g.,
|
||||||
|
throwing to a saved continuation or raising an exception) also causes the
|
||||||
|
lock to be released.
|
||||||
|
After a normal return from thunk, its return values are returned by
|
||||||
|
with-dot-lock*. The with-dot-lock special form is equivalent syntac-
|
||||||
|
tic sugar.
|
||||||
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
1.0.1
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
(import (scheme base)
|
||||||
|
(scheme write)
|
||||||
|
(scheme read)
|
||||||
|
(scheme char)
|
||||||
|
(scheme file)
|
||||||
|
(scheme process-context)
|
||||||
|
(retropikzel tap)
|
||||||
|
(retropikzel dot-locking)
|
||||||
|
(srfi 64))
|
||||||
|
|
||||||
|
(test-runner-current (tap-runner))
|
||||||
|
|
||||||
|
(test-begin "dot-locking")
|
||||||
|
|
||||||
|
|
||||||
|
(test-begin "obtain-dot-lock")
|
||||||
|
(let* ((testfile "/tmp/scshtestfile.txt")
|
||||||
|
(lockfile (string-append testfile ".lock")))
|
||||||
|
(when (file-exists? testfile) (delete-file testfile))
|
||||||
|
(when (file-exists? lockfile) (delete-file lockfile))
|
||||||
|
(with-output-to-file testfile (lambda () (display 1)))
|
||||||
|
(obtain-dot-lock testfile)
|
||||||
|
(test-assert (file-exists? lockfile)))
|
||||||
|
(test-end "obtain-dot-lock")
|
||||||
|
|
||||||
|
|
||||||
|
(test-begin "break-dot-lock")
|
||||||
|
(let* ((testfile "/tmp/scshtestfile.txt")
|
||||||
|
(lockfile (string-append testfile ".lock")))
|
||||||
|
(when (file-exists? testfile) (delete-file testfile))
|
||||||
|
(when (file-exists? lockfile) (delete-file lockfile))
|
||||||
|
(with-output-to-file testfile (lambda () (display 1)))
|
||||||
|
(obtain-dot-lock testfile)
|
||||||
|
(break-dot-lock testfile)
|
||||||
|
(test-assert (not (file-exists? lockfile))))
|
||||||
|
(test-end "break-dot-lock")
|
||||||
|
|
||||||
|
|
||||||
|
(test-begin "release-dot-lock")
|
||||||
|
(let* ((testfile "/tmp/scshtestfile.txt")
|
||||||
|
(lockfile (string-append testfile ".lock")))
|
||||||
|
(when (file-exists? testfile) (delete-file testfile))
|
||||||
|
(when (file-exists? lockfile) (delete-file lockfile))
|
||||||
|
(with-output-to-file testfile (lambda () (display 1)))
|
||||||
|
(obtain-dot-lock testfile)
|
||||||
|
(test-assert (release-dot-lock testfile)))
|
||||||
|
(test-end "release-dot-lock")
|
||||||
|
|
||||||
|
|
||||||
|
(test-begin "with-dot-lock*")
|
||||||
|
(let* ((testfile "/tmp/scshtestfile.txt")
|
||||||
|
(lockfile (string-append testfile ".lock")))
|
||||||
|
(when (file-exists? testfile) (delete-file testfile))
|
||||||
|
(when (file-exists? lockfile) (delete-file lockfile))
|
||||||
|
(with-output-to-file testfile (lambda () (display 1)))
|
||||||
|
(with-dot-lock*
|
||||||
|
testfile
|
||||||
|
(lambda ()
|
||||||
|
(test-assert (file-exists? lockfile)))))
|
||||||
|
(test-end "with-dot-lock*")
|
||||||
|
|
||||||
|
|
||||||
|
(test-begin "with-dot-lock")
|
||||||
|
(let* ((testfile "/tmp/scshtestfile.txt")
|
||||||
|
(lockfile (string-append testfile ".lock")))
|
||||||
|
(when (file-exists? testfile) (delete-file testfile))
|
||||||
|
(when (file-exists? lockfile) (delete-file lockfile))
|
||||||
|
(with-output-to-file testfile (lambda () (display 1)))
|
||||||
|
(with-dot-lock testfile (test-assert (file-exists? lockfile))))
|
||||||
|
(test-end "with-dot-lock")
|
||||||
|
|
||||||
|
|
||||||
|
(test-end "dot-locking")
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
(define-syntax match
|
||||||
|
(syntax-rules (or)
|
||||||
|
((_ val compare-with (compare-to body ...) ...)
|
||||||
|
(cond ((compare-with val compare-to) body ...) ...))))
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
(define-library
|
||||||
|
(retropikzel match)
|
||||||
|
(import (scheme base)
|
||||||
|
(scheme write))
|
||||||
|
(export match)
|
||||||
|
(include "match.scm"))
|
||||||
|
|
@ -0,0 +1,165 @@
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
||||||
|
This version of the GNU Lesser General Public License incorporates
|
||||||
|
the terms and conditions of version 3 of the GNU General Public
|
||||||
|
License, supplemented by the additional permissions listed below.
|
||||||
|
|
||||||
|
0. Additional Definitions.
|
||||||
|
|
||||||
|
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||||
|
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||||
|
General Public License.
|
||||||
|
|
||||||
|
"The Library" refers to a covered work governed by this License,
|
||||||
|
other than an Application or a Combined Work as defined below.
|
||||||
|
|
||||||
|
An "Application" is any work that makes use of an interface provided
|
||||||
|
by the Library, but which is not otherwise based on the Library.
|
||||||
|
Defining a subclass of a class defined by the Library is deemed a mode
|
||||||
|
of using an interface provided by the Library.
|
||||||
|
|
||||||
|
A "Combined Work" is a work produced by combining or linking an
|
||||||
|
Application with the Library. The particular version of the Library
|
||||||
|
with which the Combined Work was made is also called the "Linked
|
||||||
|
Version".
|
||||||
|
|
||||||
|
The "Minimal Corresponding Source" for a Combined Work means the
|
||||||
|
Corresponding Source for the Combined Work, excluding any source code
|
||||||
|
for portions of the Combined Work that, considered in isolation, are
|
||||||
|
based on the Application, and not on the Linked Version.
|
||||||
|
|
||||||
|
The "Corresponding Application Code" for a Combined Work means the
|
||||||
|
object code and/or source code for the Application, including any data
|
||||||
|
and utility programs needed for reproducing the Combined Work from the
|
||||||
|
Application, but excluding the System Libraries of the Combined Work.
|
||||||
|
|
||||||
|
1. Exception to Section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
You may convey a covered work under sections 3 and 4 of this License
|
||||||
|
without being bound by section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
2. Conveying Modified Versions.
|
||||||
|
|
||||||
|
If you modify a copy of the Library, and, in your modifications, a
|
||||||
|
facility refers to a function or data to be supplied by an Application
|
||||||
|
that uses the facility (other than as an argument passed when the
|
||||||
|
facility is invoked), then you may convey a copy of the modified
|
||||||
|
version:
|
||||||
|
|
||||||
|
a) under this License, provided that you make a good faith effort to
|
||||||
|
ensure that, in the event an Application does not supply the
|
||||||
|
function or data, the facility still operates, and performs
|
||||||
|
whatever part of its purpose remains meaningful, or
|
||||||
|
|
||||||
|
b) under the GNU GPL, with none of the additional permissions of
|
||||||
|
this License applicable to that copy.
|
||||||
|
|
||||||
|
3. Object Code Incorporating Material from Library Header Files.
|
||||||
|
|
||||||
|
The object code form of an Application may incorporate material from
|
||||||
|
a header file that is part of the Library. You may convey such object
|
||||||
|
code under terms of your choice, provided that, if the incorporated
|
||||||
|
material is not limited to numerical parameters, data structure
|
||||||
|
layouts and accessors, or small macros, inline functions and templates
|
||||||
|
(ten or fewer lines in length), you do both of the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the object code that the
|
||||||
|
Library is used in it and that the Library and its use are
|
||||||
|
covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
4. Combined Works.
|
||||||
|
|
||||||
|
You may convey a Combined Work under terms of your choice that,
|
||||||
|
taken together, effectively do not restrict modification of the
|
||||||
|
portions of the Library contained in the Combined Work and reverse
|
||||||
|
engineering for debugging such modifications, if you also do each of
|
||||||
|
the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the Combined Work that
|
||||||
|
the Library is used in it and that the Library and its use are
|
||||||
|
covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
c) For a Combined Work that displays copyright notices during
|
||||||
|
execution, include the copyright notice for the Library among
|
||||||
|
these notices, as well as a reference directing the user to the
|
||||||
|
copies of the GNU GPL and this license document.
|
||||||
|
|
||||||
|
d) Do one of the following:
|
||||||
|
|
||||||
|
0) Convey the Minimal Corresponding Source under the terms of this
|
||||||
|
License, and the Corresponding Application Code in a form
|
||||||
|
suitable for, and under terms that permit, the user to
|
||||||
|
recombine or relink the Application with a modified version of
|
||||||
|
the Linked Version to produce a modified Combined Work, in the
|
||||||
|
manner specified by section 6 of the GNU GPL for conveying
|
||||||
|
Corresponding Source.
|
||||||
|
|
||||||
|
1) Use a suitable shared library mechanism for linking with the
|
||||||
|
Library. A suitable mechanism is one that (a) uses at run time
|
||||||
|
a copy of the Library already present on the user's computer
|
||||||
|
system, and (b) will operate properly with a modified version
|
||||||
|
of the Library that is interface-compatible with the Linked
|
||||||
|
Version.
|
||||||
|
|
||||||
|
e) Provide Installation Information, but only if you would otherwise
|
||||||
|
be required to provide such information under section 6 of the
|
||||||
|
GNU GPL, and only to the extent that such information is
|
||||||
|
necessary to install and execute a modified version of the
|
||||||
|
Combined Work produced by recombining or relinking the
|
||||||
|
Application with a modified version of the Linked Version. (If
|
||||||
|
you use option 4d0, the Installation Information must accompany
|
||||||
|
the Minimal Corresponding Source and Corresponding Application
|
||||||
|
Code. If you use option 4d1, you must provide the Installation
|
||||||
|
Information in the manner specified by section 6 of the GNU GPL
|
||||||
|
for conveying Corresponding Source.)
|
||||||
|
|
||||||
|
5. Combined Libraries.
|
||||||
|
|
||||||
|
You may place library facilities that are a work based on the
|
||||||
|
Library side by side in a single library together with other library
|
||||||
|
facilities that are not Applications and are not covered by this
|
||||||
|
License, and convey such a combined library under terms of your
|
||||||
|
choice, if you do both of the following:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work based
|
||||||
|
on the Library, uncombined with any other library facilities,
|
||||||
|
conveyed under the terms of this License.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library that part of it
|
||||||
|
is a work based on the Library, and explaining where to find the
|
||||||
|
accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
6. Revised Versions of the GNU Lesser General Public License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the GNU Lesser General Public License from time to time. Such new
|
||||||
|
versions will be similar in spirit to the present version, but may
|
||||||
|
differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Library as you received it specifies that a certain numbered version
|
||||||
|
of the GNU Lesser General Public License "or any later version"
|
||||||
|
applies to it, you have the option of following the terms and
|
||||||
|
conditions either of that published version or of any later version
|
||||||
|
published by the Free Software Foundation. If the Library as you
|
||||||
|
received it does not specify a version number of the GNU Lesser
|
||||||
|
General Public License, you may choose any version of the GNU Lesser
|
||||||
|
General Public License ever published by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Library as you received it specifies that a proxy can decide
|
||||||
|
whether future versions of the GNU Lesser General Public License shall
|
||||||
|
apply, that proxy's public statement of acceptance of any version is
|
||||||
|
permanent authorization for you to choose that version for the
|
||||||
|
Library.
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
WIP
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
0.1.0
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
(import (scheme base)
|
||||||
|
(scheme write)
|
||||||
|
(retropikzel tap)
|
||||||
|
(retropikzel match)
|
||||||
|
(retropikzel debug)
|
||||||
|
(srfi 64))
|
||||||
|
|
||||||
|
(test-runner-current (tap-runner))
|
||||||
|
|
||||||
|
(test-begin "match")
|
||||||
|
|
||||||
|
(define val "Hello")
|
||||||
|
|
||||||
|
(test-equal 1 (debug (match val equal? ("world" 0) ("Hello" 1))))
|
||||||
|
(test-equal 1 (debug (match 2 = (1 0) (2 1))))
|
||||||
|
|
||||||
|
(test-end "match")
|
||||||
|
|
@ -1,6 +1,27 @@
|
||||||
(define tap-output-port (current-output-port))
|
;;> \pre{
|
||||||
(define (set-tap-runner-output-port! port) (set! tap-output-port port))
|
;;> TAP output for SRFI-64
|
||||||
|
;;>
|
||||||
|
;;> [Test Anything Protocol](https://testanything.org/)
|
||||||
|
;;>
|
||||||
|
;;>}
|
||||||
|
|
||||||
|
;;> \section{Usage}
|
||||||
|
;;> \pre{
|
||||||
|
;;> (import (scheme base)
|
||||||
|
;;> (srfi 64)
|
||||||
|
;;> (retropikzel tap))
|
||||||
|
;;>
|
||||||
|
;;> (test-runner-current (tap-runner))
|
||||||
|
;;>
|
||||||
|
;;> (test-begin "My Cool Library")
|
||||||
|
;;> (test-equal 1 1)
|
||||||
|
;;> (test-end "My Cool Library")
|
||||||
|
;;>}
|
||||||
|
|
||||||
|
;;> \section{Reference}
|
||||||
|
|
||||||
|
|
||||||
|
;;>Get the TAP test runner.
|
||||||
(define-syntax tap-runner
|
(define-syntax tap-runner
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
((_)
|
((_)
|
||||||
|
|
@ -20,23 +41,27 @@
|
||||||
(print
|
(print
|
||||||
(lambda args
|
(lambda args
|
||||||
(map (lambda (item)
|
(map (lambda (item)
|
||||||
(display item tap-output-port))
|
(display item))
|
||||||
(append indentation args))))
|
(append indentation args))))
|
||||||
(println
|
(println
|
||||||
(lambda args
|
(lambda args
|
||||||
(map (lambda (item)
|
(map (lambda (item)
|
||||||
(display item tap-output-port))
|
(display item))
|
||||||
(append indentation args))
|
(append indentation args))
|
||||||
(display "\n" tap-output-port)))
|
(display "\n")))
|
||||||
(runner (test-runner-null))
|
(runner (test-runner-null))
|
||||||
(started? #f)
|
(started? #f)
|
||||||
(current-test-groups (vector))
|
(current-test-groups (vector))
|
||||||
(current-test-group-count 0)
|
(current-test-group-count 0)
|
||||||
(current-suite-name #f))
|
(current-suite-name #f)
|
||||||
|
(exit-with-fail? #f))
|
||||||
|
|
||||||
(test-runner-on-group-begin!
|
(test-runner-on-group-begin!
|
||||||
runner
|
runner
|
||||||
(lambda (runner suite-name count)
|
(lambda (runner suite-name count)
|
||||||
|
(when (not started?)
|
||||||
|
(println "TAP version 14")
|
||||||
|
(set! started? #t))
|
||||||
(set! current-test-group-count 0)
|
(set! current-test-group-count 0)
|
||||||
(when current-suite-name
|
(when current-suite-name
|
||||||
(println "# Subtest: " suite-name)
|
(println "# Subtest: " suite-name)
|
||||||
|
|
@ -60,9 +85,6 @@
|
||||||
(test-runner-on-test-begin!
|
(test-runner-on-test-begin!
|
||||||
runner
|
runner
|
||||||
(lambda (runner)
|
(lambda (runner)
|
||||||
(when (not started?)
|
|
||||||
(println "TAP version 14")
|
|
||||||
(set! started? #t))
|
|
||||||
(set! current-test-group-count (+ current-test-group-count 1))))
|
(set! current-test-group-count (+ current-test-group-count 1))))
|
||||||
|
|
||||||
(test-runner-on-test-end!
|
(test-runner-on-test-end!
|
||||||
|
|
@ -81,7 +103,9 @@
|
||||||
(let ((value (test-result-ref runner key)))
|
(let ((value (test-result-ref runner key)))
|
||||||
(if value (any->string value) "")))))
|
(if value (any->string value) "")))))
|
||||||
(let* ((failed? (or (equal? result 'fail) (equal? result 'xfail))))
|
(let* ((failed? (or (equal? result 'fail) (equal? result 'xfail))))
|
||||||
(when failed? (print "not "))
|
(when failed?
|
||||||
|
(set! exit-with-fail? #t)
|
||||||
|
(print "not "))
|
||||||
(print "ok " current-test-group-count)
|
(print "ok " current-test-group-count)
|
||||||
(if (and (string? name) (not (string=? name "")))
|
(if (and (string? name) (not (string=? name "")))
|
||||||
(println " - " name)
|
(println " - " name)
|
||||||
|
|
@ -96,4 +120,10 @@
|
||||||
(println " at: ")
|
(println " at: ")
|
||||||
(println " file: " (result-ref runner 'source-file))
|
(println " file: " (result-ref runner 'source-file))
|
||||||
(println " line: " (result-ref runner 'source-line)))))))
|
(println " line: " (result-ref runner 'source-line)))))))
|
||||||
|
|
||||||
|
(test-runner-on-final!
|
||||||
|
runner
|
||||||
|
(lambda (runner)
|
||||||
|
(when exit-with-fail? (exit 1))))
|
||||||
|
|
||||||
runner))))
|
runner))))
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
(retropikzel tap)
|
(retropikzel tap)
|
||||||
(import (scheme base)
|
(import (scheme base)
|
||||||
(scheme write)
|
(scheme write)
|
||||||
|
(scheme process-context)
|
||||||
(srfi 64))
|
(srfi 64))
|
||||||
(export tap-runner
|
(export tap-runner)
|
||||||
set-tap-runner-output-port!)
|
|
||||||
(include "tap.scm"))
|
(include "tap.scm"))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
0.2.1
|
0.3.1
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
(import (scheme base)
|
||||||
|
(retropikzel tap)
|
||||||
|
(srfi 64))
|
||||||
|
|
||||||
(test-runner-current (tap-runner))
|
(test-runner-current (tap-runner))
|
||||||
|
|
||||||
|
|
@ -8,8 +11,8 @@
|
||||||
(test-begin "tap 1")
|
(test-begin "tap 1")
|
||||||
(test-assert #t)
|
(test-assert #t)
|
||||||
(test-assert #t)
|
(test-assert #t)
|
||||||
(test-assert #f)
|
;(test-assert #f)
|
||||||
(test-equal '(1 2 3) '(4 5 6))
|
;(test-equal '(1 2 3) '(4 5 6))
|
||||||
(test-end "tap 1")
|
(test-end "tap 1")
|
||||||
|
|
||||||
(test-begin "tap 2")
|
(test-begin "tap 2")
|
||||||
|
|
@ -19,6 +22,6 @@
|
||||||
(test-end "tap 2")
|
(test-end "tap 2")
|
||||||
|
|
||||||
(test-assert #t)
|
(test-assert #t)
|
||||||
(test-equal '(4 5 6) '(7 8 9))
|
;(test-equal '(4 5 6) '(7 8 9))
|
||||||
|
|
||||||
(test-end "tap")
|
(test-end "tap")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue