forked from sympy/sympy
/
test_travis.sh
executable file
·68 lines (65 loc) · 1.76 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#! /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 man
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(split='${SPLIT}', 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
elif [[ "${TEST_GMPY}" == "true" ]] && [[ "${TEST_MATPLOTLIB}" == "true" ]]; then
cat << EOF | python
import sympy
if not (sympy.test('sympy/polys/', 'sympy/plotting') and
sympy.doctest('sympy/polys/', 'sympy/plotting')):
raise Exception('Tests failed')
EOF
elif [[ "${TEST_AUTOWRAP}" == "true" ]]; then
cat << EOF | python
import sympy
if not sympy.test('sympy/external/tests/test_autowrap.py'):
raise Exception('Tests failed')
EOF
else
cat << EOF | python
import sympy
if not sympy.test(split='${SPLIT}'):
raise Exception('Tests failed')
EOF
fi
fi