forked from sympy/sympy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
test_travis.sh
executable file
·54 lines (51 loc) · 1.27 KB
/
test_travis.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
#! /usr/bin/env bash
# Exit on error
set -e
# Echo each command
set -x
if [[ "${TEST_SPHINX}" == "true" ]]; then
cd doc
make html-errors
make clean
make latex
cd _build/latex
export LATEXOPTIONS="-interaction=nonstopmode"
make all
elif [[ "${TEST_SAGE}" == "true" ]]; then
sage -v
sage -python bin/test sympy/external/tests/test_sage.py
else
# We change directories to make sure that we test the installed version of
# sympy.
mkdir empty
cd empty
if [[ "${TEST_DOCTESTS}" == "true" ]]; then
cat << EOF | python
import sympy
if not sympy.doctest():
raise Exception('Tests failed')
EOF
cd ..
bin/doctest doc/
elif [[ "${TEST_SLOW}" == "true" ]]; then
cat << EOF | python
import sympy
if not sympy.test(slow=True, timeout=180):
# Travis times out if no activity is seen for 10 minutes. It also times
# out if the whole tests run for more than 50 minutes.
raise Exception('Tests failed')
EOF
elif [[ "${TEST_THEANO}" == "true" ]]; then
cat << EOF | python
import sympy
if not sympy.test('*theano*'):
raise Exception('Tests failed')
EOF
else
cat << EOF | python
import sympy
if not sympy.test(split='${SPLIT}'):
raise Exception('Tests failed')
EOF
fi
fi