-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_tests.sh
executable file
·45 lines (35 loc) · 1.06 KB
/
run_tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh -e
EMACS="${EMACS:=emacs}"
NEEDED_PACKAGES="package-lint"
INIT_PACKAGE_EL="(progn \
(require 'package) \
(push '(\"melpa\" . \"https://melpa.org/packages/\") package-archives) \
(package-initialize) \
(unless package-archive-contents \
(package-refresh-contents)) \
(dolist (pkg '(${NEEDED_PACKAGES})) \
(unless (package-installed-p pkg) \
(package-install pkg))))"
# Refresh package archives, because the test suite needs to see at least
# package-lint.
"$EMACS" -Q -batch \
--eval "$INIT_PACKAGE_EL"
# Byte-compile
"$EMACS" -Q -batch \
--eval "$INIT_PACKAGE_EL" \
-l display-wttr.el \
-f batch-byte-compile \
display-wttr.el
# Linting
"$EMACS" -Q -batch \
--eval "$INIT_PACKAGE_EL" \
-L . \
--eval "(require 'package-lint)" \
-f package-lint-batch-and-exit \
display-wttr.el
# Testing
"$EMACS" -Q --batch \
--eval "$INIT_PACKAGE_EL" \
-l display-wttr.elc \
-l display-wttr-test.el \
-f ert-run-tests-batch-and-exit