39 lines
1 KiB
Bash
Executable file
39 lines
1 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
if [ "$GRAALVM_HOME" != "" ]
|
|
then
|
|
export JAVA_HOME=$GRAALVM_HOME
|
|
export PATH=$GRAALVM_HOME/bin:$PATH
|
|
fi
|
|
|
|
java -version
|
|
|
|
set -eo pipefail
|
|
unset BABASHKA_PRELOADS
|
|
unset BABASHKA_CLASSPATH
|
|
unset BABASHKA_PRELOADS_TEST
|
|
|
|
echo "running tests part 1"
|
|
lein "do" clean, test "$@"
|
|
|
|
export BABASHKA_PRELOADS='(defn __bb__foo [] "foo") (defn __bb__bar [] "bar")'
|
|
export BABASHKA_PRELOADS_TEST=true
|
|
echo "running tests part 2"
|
|
lein test :only babashka.main-test/preloads-test
|
|
|
|
export BABASHKA_PRELOADS='(defn ithrow [] (/ 1 0))'
|
|
export BABASHKA_PRELOADS_TEST=true
|
|
echo "running tests part 3"
|
|
lein test :only babashka.main-test/preloads-file-location-test
|
|
|
|
export BABASHKA_PRELOADS="(require '[env-ns])"
|
|
export BABASHKA_CLASSPATH_TEST=true
|
|
export BABASHKA_CLASSPATH="test-resources/babashka/src_for_classpath_test/env"
|
|
echo "running tests part 4"
|
|
lein test :only babashka.classpath-test/classpath-env-test
|
|
|
|
export BABASHKA_POD_TEST=true
|
|
lein test :only babashka.pod-test
|
|
|
|
export BABASHKA_SOCKET_REPL_TEST=true
|
|
lein test :only babashka.impl.socket-repl-test
|