forked from ativelkov/murano-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_tests.sh
executable file
·44 lines (37 loc) · 1.33 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
#!/bin/bash
EXPECTED_TOX_VERSION="1.6.1"
tox_version=`tox --version 2>/dev/null`
if [ $? -ne 0 ]; then
tox_version="not installed"
else
tox_version=`echo $tox_version | cut -d' ' -f1`
fi
echo "run_tests.sh is deprecated in favor of running tox directly."
echo "This will ensure your results are the same as Jenkins'."
echo
if [ "$tox_version" == "not installed" ]; then
echo "It looks like tox isn't installed. You can install (globally or"
echo "into a virtualenv) with pip. Be sure to install version 1.6.1,"
echo "since later versions have problems running some tests. To install:"
echo
echo " pip install \"tox==1.6.1\""
echo
elif [ "$tox_version" != "$EXPECTED_TOX_VERSION" ]; then
echo "## WARNING ##"
echo "You have tox version $tox_version installed. Consider installing"
echo "version $EXPECTED_TOX_VERSION, since later versions may not run tests correctly."
echo
else
echo "You have tox $tox_version installed."
echo
fi
echo "To run unit tests or pep8 using tox:"
echo
echo " 'tox -e pep8' will run style checks"
echo " 'tox -e py26' will run python 2.6 unit tests"
echo " 'tox -e py27' will run python 2.7 unit tests"
echo " 'tox' will run all unit tests and pep8 (as Jenkins does)"
echo
echo "Tox creates its own virtual environments."
echo
echo "To run functional tests, run ./functionaltests/run_tests.sh"