-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtest_snitch.sh
executable file
·68 lines (61 loc) · 2.3 KB
/
test_snitch.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
set -e
LINT_FILES='
snitch.el
snitch-backtrace.el
snitch-custom.el
snitch-filter.el
snitch-log.el
snitch-timer.el'
QUOTED_LINT_FILES=""
for file in ${LINT_FILES}; do
QUOTED_LINT_FILES="$QUOTED_LINT_FILES \"$file\"";
done
#lint-compile:
# @if [ -n "${LINT_COMPILE_FILES}" ]; then \
# echo "# Run byte compilation on $(call split_with_commas,${MAKEL_LINT_COMPILE_FILES})…"; \
# ${BATCH} \
# --eval "(setq byte-compile-error-on-warn t)" \
# $(if ${LINT_COMPILE_OPTIONS},${LINT_COMPILE_OPTIONS}) \
# --funcall batch-byte-compile \
# ${MAKEL_LINT_COMPILE_FILES}; \
# fi
echo "byte-compiling..."
emacs -batch \
--eval "(package-initialize)" \
--eval "(setq load-path (seq-filter \
(lambda (x) (not (string-match \"/snitch\" x))) load-path))" \
--eval "(add-to-list 'load-path \"~/.emacs.d/snitch/\")" \
--eval "(require 'snitch)" \
--eval "(message \"Testing snitch version: %s\" (snitch-version))" \
--eval "(setq byte-compile-error-on-warn t)" \
--funcall batch-byte-compile \
${LINT_FILES}
echo "checkdoc..."
# Just print findings, don't exit on errors
emacs -batch \
--eval "(mapcar #'checkdoc-file (list ${QUOTED_LINT_FILES}))"
echo "package-lint..."
emacs -batch \
--eval "(package-initialize)" \
--eval "(setq load-path (seq-filter \
(lambda (x) (not (string-match \"/snitch\" x))) load-path))" \
--eval "(add-to-list 'load-path \"~/.emacs.d/snitch/\")" \
--eval "(require 'snitch)" \
--eval "(message \"Testing snitch version: %s\" (snitch-version))" \
--eval "(setq package-lint-batch-fail-on-warnings nil)" \
--eval "(setq package-lint-main-file \"snitch.el\")" \
-L . \
-f package-lint-batch-and-exit \
snitch.el snitch-backtrace.el snitch-custom.el \
snitch-filter.el snitch-log.el snitch-timer.el
echo "ert tests..."
emacs -batch \
--eval "(package-initialize)" \
--eval "(setq load-path (seq-filter \
(lambda (x) (not (string-match \"/snitch\" x))) load-path))" \
--eval "(add-to-list 'load-path \"~/.emacs.d/snitch/\")" \
--eval "(require 'snitch)" \
--eval "(message \"Testing snitch version: %s\" (snitch-version))" \
-l ert -l snitch-test.el \
-f ert-run-tests-batch-and-exit