Started moving tests to their own files

This commit is contained in:
retropikzel 2024-05-18 10:55:55 +03:00
parent 30add0ee3a
commit a9c44faf6d
5 changed files with 23 additions and 27 deletions

View File

@ -1,7 +1,6 @@
.PHONY: test/import.scm test/import.scm test/pffi-define.scm test/size-of.scm .PHONY: test/import.scm test/import.scm test/pffi-define.scm test/size-of.scm
VERSION=v0-1-0 VERSION=v0-1-0
SASH=sash -c -r7 -L .
GUILE=GUILE_AUTO_COMPILE=0 guile --no-auto-compile --fresh-auto-compile --r7rs -L . GUILE=GUILE_AUTO_COMPILE=0 guile --no-auto-compile --fresh-auto-compile --r7rs -L .
RACKET=racket -I r7rs --make -S $(shell pwd) --script RACKET=racket -I r7rs --make -S $(shell pwd) --script
STKLOS=STKLOS_FRAMES=200 stklos -A . --compiler-flags='+line-info,+time-display,unroll-iterations=3' -f STKLOS=STKLOS_FRAMES=200 stklos -A . --compiler-flags='+line-info,+time-display,unroll-iterations=3' -f
@ -37,12 +36,7 @@ documentation:
schubert document schubert document
VERSION=${VERSION} bash doc/generate.sh > documentation.md VERSION=${VERSION} bash doc/generate.sh > documentation.md
test-sagittarius:
${SASH} ./test/import.scm
${SASH} ./test/
test/import.scm: clean build test/import.scm: clean build
${SASH} $@
${GUILE} $@ ${GUILE} $@
${RACKET} $@ ${RACKET} $@
${STKLOS} $@ ${STKLOS} $@
@ -53,7 +47,6 @@ test/import.scm: clean build
#${GERBIL} $@ #${GERBIL} $@
test/pffi-define.scm: clean build test/pffi-define.scm: clean build
${SASH} $@
${GUILE} $@ ${GUILE} $@
${RACKET} $@ ${RACKET} $@
${KAWA} $@ ${KAWA} $@
@ -63,27 +56,16 @@ test/pffi-define.scm: clean build
${GAMBIT} -ld-options -lcurl -exe $@ && ./test/pffi-define ${GAMBIT} -ld-options -lcurl -exe $@ && ./test/pffi-define
test/size-of.scm: test/size-of.scm:
${SASH} $@
${GUILE} $@ ${GUILE} $@
${KAWA} $@ ${KAWA} $@
test/pointer-set-get.scm: test/pointer-set-get.scm:
${SASH} $@
${GUILE} $@ ${GUILE} $@
#${RACKET} $@ #${RACKET} $@
#${STKLOS} $@ #${STKLOS} $@
${KAWA} $@ ${KAWA} $@
test/string-to-pointer-to-string.scm: test/string-to-pointer-to-string.scm:
${SASH} $@
${GUILE} $@
#${RACKET} $@
#${STKLOS} $@
${KAWA} $@
test/sdl2.scm:
${SASH} $@
${GUILE} $@ ${GUILE} $@
#${RACKET} $@ #${RACKET} $@
#${STKLOS} $@ #${STKLOS} $@

4
scripts/init-test.sh Normal file
View File

@ -0,0 +1,4 @@
set -eu
make clean
make tmp

View File

@ -0,0 +1,6 @@
${SCHEME} ./test/import.scm
${SCHEME} ./test/pffi-define.scm
${SCHEME} ./test/size-of.scm
${SCHEME} ./test/pointer-set-get.scm
${SCHEME} ./test/string-to-pointer-to-string.scm

View File

@ -1,18 +1,16 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eu
make clean source scripts/init-test.sh
make tmp
VERSION=v0-1-0 VERSION=v0-1-0
GAMBIT="gsc -:r7rs,search=." SCHEME="gsc -:r7rs,search=."
GAMBIT_I="gsi -:r7rs,search=." SCHEME_I="gsi -:r7rs,search=."
${GAMBIT} -obj retropikzel/pffi/${VERSION}/gambit.scm ${SCHEME} -obj retropikzel/pffi/${VERSION}/gambit.scm
${GAMBIT} -obj retropikzel/pffi/${VERSION}/main.sld ${SCHEME} -obj retropikzel/pffi/${VERSION}/main.sld
${GAMBIT_I} ./test/import.scm ${SCHEME_I} ./test/import.scm
${GAMBIT} -o ./tmp/import ./test/import.scm ${SCHEME} -o ./tmp/import ./test/import.scm
./tmp/import ./tmp/import

6
test-sagittarius.sh Normal file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
source scripts/init-test.sh
SCHEME="sash -c -r7 -L ."
source scripts/test-runs-dynamic.sh