Skip to content

Commit 2955076

Browse files
committed
Merge pull request #110 from sviridov/evm-tests
Added: ability to run tests via EVM
2 parents d80d10d + 5b6cd76 commit 2955076

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

run_tests

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
#!/bin/bash
22
# -*- shell-script -*-
33
OUTPUT=/tmp/test-output.txt
4-
emacs -batch -l ert-bootstrap.el -l elixir-mode-tests.el -f ert-run-tests-batch-and-exit 2> $OUTPUT
4+
5+
EMACS_BINARY="emacs"
6+
7+
EMACS_VERSION=$1
8+
if [ -n "$EMACS_VERSION" ]; then
9+
EMACS_BINARY=`evm bin $EMACS_VERSION`
10+
fi
11+
12+
LOAD_FILES="-l ert-bootstrap.el -l elixir-mode-tests.el"
13+
14+
$EMACS_BINARY -batch $LOAD_FILES -f ert-run-tests-batch-and-exit 2> $OUTPUT
515

616
if [ $? == 0 ]; then
717
echo "Success -- All tests passed."
@@ -17,7 +27,7 @@ else
1727
break
1828
;;
1929
*)
20-
emacs -l elixir-mode-tests.el -f ert-run-tests-interactively
30+
$EMACS_BINARY -q $LOAD_FILES -f ert-run-tests-interactively
2131
break
2232
;;
2333
esac

0 commit comments

Comments
 (0)