From 0758aa5c84d73415782f9a9925eaee52e4778ea1 Mon Sep 17 00:00:00 2001 From: retropikzel Date: Tue, 15 Jul 2025 09:07:20 +0300 Subject: [PATCH] Fixing tests --- Makefile | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index ef43151..4dcd817 100644 --- a/Makefile +++ b/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"