forked from emacsmirror/python-mode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-travis-ci.sh
executable file
·131 lines (112 loc) · 3.19 KB
/
run-travis-ci.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/bin/sh
# Author: Andreas Röhler <andreas.roehler@online.de>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Commentary:
# This script tests functions from python-mode.el.
# Code:
emacs27=~$HOME/emacs-20180529/src/emacs-27.0.50.1
ARSUBR=~/werkstatt/thingatpt-utils-core/ar-subr.el
PYTHON=~/emacs-20180529/lisp/progmodes/python.el
PDIR=$PWD
echo "\$PWD: $PWD"
# WERKSTATT set in .bashrc, thus unset remotly
WERKSTATT=${WERKSTATT:=1}
echo "\$WERKSTATT: $WERKSTATT"
TESTDIR=$PDIR/test
export TESTDIR
# echo "\$1: $1"
# if $1; then
# PYTHONMODE=$PDIR/$1
if [ -s $PDIR/python-mode.el ]; then
PYTHONMODE=$PDIR/python-mode.el
elif [ -s $PDIR/python-components-mode.el ]; then
PYTHONMODE=$PDIR/python-components-mode.el
fi
echo "\$PYTHONMODE: $PYTHONMODE"
SETUP=$TESTDIR/setup-ert-tests.el
TEST1=$TESTDIR/py-ert-tests-1.el
TEST2=$TESTDIR/py-ert-tests-2.el
TEST3=$TESTDIR/py-ert-always-split-lp-1361531-tests.el
TEST4=$TESTDIR/py-ert-just-two-split-lp-1361531-tests.el
TEST5=$TESTDIR/py-ert-beginning-tests.el
TEST6=$TESTDIR/py-ert-forward-tests.el
TEST7=$TESTDIR/py-ert-function-tests.el
TEST8=$TESTDIR/py-ert-variablen-tests.el
TEST9=$TESTDIR/py-shell-arg-ert-tests.el
TEST10=$TESTDIR/py-ert-execute-block-test.el
TEST11=$TESTDIR/py-ert-execute-region-test.el
TEST12=$TESTDIR/py-execute-region-commandp-test.el
TEST13=$TESTDIR/py-ert-tests-3.el
TEST14=$TESTDIR/py-ert-forward-tests.el
TEST15=$TESTDIR/py-ert-tests-4.el
TEST16=$TESTDIR/py-extra-tests.el
if [ -s emacs27 ]; then
EMACS=emacs27
else
EMACS=emacs
fi
echo "\$EMACS: $EMACS"
PYCO="$PDIR/completion/pycomplete.el"
hier() {
date; time -p $EMACS -Q --batch \
--eval "(message (emacs-version))" \
--eval "(setq py-debug-p nil)" \
--eval "(setq py-verbose-p nil)" \
--eval "(add-to-list 'load-path \"$PDIR/\")" \
--eval "(add-to-list 'load-path \"$TESTDIR/\")" \
-load $SETUP \
-load $PYTHONMODE \
-l $TEST1 \
-l $TEST2 \
-l $TEST4 \
-l $TEST5 \
-l $TEST6 \
-l $TEST7 \
-l $TEST8 \
-l $TEST11 \
-l $TEST12 \
-l $TEST13 \
-l $TEST14 \
-l $TEST15 \
-l $TEST16 \
-f ert-run-tests-batch-and-exit
}
entfernt() {
$EMACS -Q --batch \
--eval "(message (emacs-version))" \
--eval "(add-to-list 'load-path \"$PDIR/\")" \
--eval "(add-to-list 'load-path \"$TESTDIR/\")" \
-load $SETUP \
-load $PYTHONMODE \
-l $TEST1 \
-l $TEST2 \
-l $TEST4 \
-l $TEST5 \
-l $TEST6 \
-l $TEST7 \
-l $TEST8 \
-l $TEST12 \
-l $TEST13 \
-l $TEST14 \
-l $TEST15 \
--eval "(setq py-debug-p nil)" \
-f ert-run-tests-batch-and-exit
}
if [ $WERKSTATT -eq 0 ]; then
hier
echo "Lade testumgebung \"HIER\""
else
echo "entfernt"
echo "\$WERKSTATT: $WERKSTATT"
echo "Lade testumgebung \"ENTFERNT\""
entfernt
fi