diff --git a/Makefile b/Makefile index ff4b93e..707e4e1 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,6 @@ .PHONY: test/import.scm test/import.scm test/pffi-define.scm test/size-of.scm VERSION=v0-1-0 -SASH=sash -c -r7 -L . GUILE=GUILE_AUTO_COMPILE=0 guile --no-auto-compile --fresh-auto-compile --r7rs -L . 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 @@ -37,12 +36,7 @@ documentation: schubert document VERSION=${VERSION} bash doc/generate.sh > documentation.md -test-sagittarius: - ${SASH} ./test/import.scm - ${SASH} ./test/ - test/import.scm: clean build - ${SASH} $@ ${GUILE} $@ ${RACKET} $@ ${STKLOS} $@ @@ -53,7 +47,6 @@ test/import.scm: clean build #${GERBIL} $@ test/pffi-define.scm: clean build - ${SASH} $@ ${GUILE} $@ ${RACKET} $@ ${KAWA} $@ @@ -63,27 +56,16 @@ test/pffi-define.scm: clean build ${GAMBIT} -ld-options -lcurl -exe $@ && ./test/pffi-define test/size-of.scm: - ${SASH} $@ ${GUILE} $@ ${KAWA} $@ test/pointer-set-get.scm: - ${SASH} $@ ${GUILE} $@ #${RACKET} $@ #${STKLOS} $@ ${KAWA} $@ test/string-to-pointer-to-string.scm: - ${SASH} $@ - ${GUILE} $@ - #${RACKET} $@ - #${STKLOS} $@ - ${KAWA} $@ - - -test/sdl2.scm: - ${SASH} $@ ${GUILE} $@ #${RACKET} $@ #${STKLOS} $@ diff --git a/scripts/init-test.sh b/scripts/init-test.sh new file mode 100644 index 0000000..42a900f --- /dev/null +++ b/scripts/init-test.sh @@ -0,0 +1,4 @@ + +set -eu +make clean +make tmp diff --git a/scripts/test-runs-dynamic.sh b/scripts/test-runs-dynamic.sh new file mode 100644 index 0000000..f42c242 --- /dev/null +++ b/scripts/test-runs-dynamic.sh @@ -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 diff --git a/test-gambit.sh b/test-gambit.sh index 81f4eac..adc0b61 100644 --- a/test-gambit.sh +++ b/test-gambit.sh @@ -1,18 +1,16 @@ #!/usr/bin/env bash -set -eu -make clean -make tmp +source scripts/init-test.sh VERSION=v0-1-0 -GAMBIT="gsc -:r7rs,search=." -GAMBIT_I="gsi -:r7rs,search=." +SCHEME="gsc -:r7rs,search=." +SCHEME_I="gsi -:r7rs,search=." -${GAMBIT} -obj retropikzel/pffi/${VERSION}/gambit.scm -${GAMBIT} -obj retropikzel/pffi/${VERSION}/main.sld -${GAMBIT_I} ./test/import.scm -${GAMBIT} -o ./tmp/import ./test/import.scm +${SCHEME} -obj retropikzel/pffi/${VERSION}/gambit.scm +${SCHEME} -obj retropikzel/pffi/${VERSION}/main.sld +${SCHEME_I} ./test/import.scm +${SCHEME} -o ./tmp/import ./test/import.scm ./tmp/import diff --git a/test-sagittarius.sh b/test-sagittarius.sh new file mode 100644 index 0000000..122321c --- /dev/null +++ b/test-sagittarius.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +source scripts/init-test.sh + +SCHEME="sash -c -r7 -L ." + +source scripts/test-runs-dynamic.sh