Fixing tests
This commit is contained in:
parent
64db4e1b5d
commit
0758aa5c84
14
Makefile
14
Makefile
|
@ -30,21 +30,21 @@ uninstall:
|
|||
rm -rf ${PREFIX}/bin/compile-r7rs
|
||||
|
||||
test-r6rs: ${R6RSTMP}
|
||||
mkdir -p ${R6RSTMP}
|
||||
mkdir -p ${R6RSTMP}/libs
|
||||
printf "(library (foo bar) (export baz) (import (rnrs)) (define baz (lambda () (display \"Test successfull\") (newline))))" > ${R6RSTMP}/libs/foo/bar.sls
|
||||
printf "(import (rnrs) (foo bar)) (baz)" > ${R6RSTMP}/main.sps
|
||||
cd ${R6RSTMP} && COMPILE_R7RS=${SCHEME} compile-r7rs -I ./libs -o main main.sps
|
||||
-cd ${R6RSTMP} && timeout 60 ./main > ${R6RSTMP}/compile-r7rs-test-result.txt 2>&1
|
||||
@grep "Test successfull" ${R6RSTMP}/compile-r7rs-test-result.txt || (echo "Test failed, output: " && cat ${R6RSTMP}/compile-r7rs-test-result.txt && exit 1)
|
||||
|
||||
${R6RSTMP}:
|
||||
mkdir -p ${R6RSTMP}
|
||||
mkdir -p ${R6RSTMP}/libs
|
||||
|
||||
test-r6rs-docker:
|
||||
docker build -f Dockerfile.test --build-arg SCHEME=${SCHEME} --tag=compile-r7rs-test-${SCHEME} .
|
||||
docker run -v "${PWD}":/workdir -w /workdir -t compile-r7rs-test-${SCHEME} sh -c "make && make install && make clean-test SCHEME=${SCHEME} test-r6rs"
|
||||
|
||||
test-r7rs: ${R7RSTMP}
|
||||
test-r7rs:
|
||||
mkdir -p ${R7RSTMP}
|
||||
mkdir -p ${R7RSTMP}/libs
|
||||
echo "(import (scheme base) (foo bar)) (baz)" > ${R7RSTMP}/main.scm
|
||||
echo "(define baz (lambda () (display \"Test successfull\") (newline)))" > ${R7RSTMP}/libs/foo/bar.scm
|
||||
echo "(define-library (foo bar) (import (scheme base) (scheme write)) (export baz) (include \"bar.scm\"))" > ${R7RSTMP}/libs/foo/bar.sld
|
||||
|
@ -52,10 +52,6 @@ test-r7rs: ${R7RSTMP}
|
|||
-cd ${R7RSTMP} && timeout 60 ./main > ${R7RSTMP}/compile-r7rs-test-result.txt 2>&1
|
||||
@grep "Test successfull" ${R7RSTMP}/compile-r7rs-test-result.txt || (echo "Test failed, output: " && cat ${R7RSTMP}/compile-r7rs-test-result.txt && exit 1)
|
||||
|
||||
${R7RSTMP}:
|
||||
mkdir -p ${R7RSTMP}
|
||||
mkdir -p ${R7RSTMP}/libs
|
||||
|
||||
test-r7rs-docker:
|
||||
docker build -f Dockerfile.test --build-arg SCHEME=${SCHEME} --tag=compile-r7rs-test-${SCHEME} .
|
||||
docker run -v "${PWD}":/workdir -w /workdir -t compile-r7rs-test-${SCHEME} sh -c "make && make install && make clean-test SCHEME=${SCHEME} test-r7rs"
|
||||
|
|
Loading…
Reference in New Issue