babashka/script/test

40 lines
1 KiB
Text
Raw Normal View History

2019-08-09 12:51:42 +00:00
#!/usr/bin/env bash
2020-05-23 12:53:28 +00:00
if [ "$GRAALVM_HOME" != "" ]
then
export JAVA_HOME=$GRAALVM_HOME
export PATH=$GRAALVM_HOME/bin:$PATH
fi
java -version
2019-08-09 12:51:42 +00:00
set -eo pipefail
unset BABASHKA_PRELOADS
unset BABASHKA_CLASSPATH
unset BABASHKA_PRELOADS_TEST
2020-03-30 18:29:08 +00:00
echo "running tests part 1"
2021-03-04 09:49:16 +00:00
lein "do" clean, test "$@"
2019-08-09 12:51:42 +00:00
2020-05-23 12:53:28 +00:00
export BABASHKA_PRELOADS='(defn __bb__foo [] "foo") (defn __bb__bar [] "bar")'
export BABASHKA_PRELOADS_TEST=true
2020-03-30 18:29:08 +00:00
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
2020-05-23 12:53:28 +00:00
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
2020-08-26 16:16:11 +00:00
export BABASHKA_POD_TEST=true
lein test :only babashka.pod-test
2020-11-27 08:48:31 +00:00
export BABASHKA_SOCKET_REPL_TEST=true
lein test :only babashka.impl.socket-repl-test