run_tests.sh 597 Bytes
Newer Older
1
2
#!/bin/bash

3
4
ROUGE="\\033[1;31m"

5
6
cd $CI_PROJECT_DIR

Jamie Hall's avatar
Jamie Hall committed
7
8
export PYTHONPATH=${CI_PROJECT_DIR}/build/lib.linux-x86_64-2.7

9
10
# Performs the unit tests
cd Tests/UnitTests
11
nosetests --verbosity=3 -P .
12
# Exit now if unable to run tests
Remi Perenon's avatar
Remi Perenon committed
13
status=$?
14
15
if [ $? -ne 0 ]; then
	echo -e "$ROUGE""One or several unit tests failed"
16
	exit $status
17
fi
18
19
20
21
cd ../..

# Performs the functional tests
cd Tests/FunctionalTests/Jobs
22
rm -rf Test_*
23
python BuildJobTests.py
24
nosetests --verbosity=3 --exe Test_*.py
Remi Perenon's avatar
Remi Perenon committed
25

Remi Perenon's avatar
Remi Perenon committed
26
status=$?
Remi Perenon's avatar
Remi Perenon committed
27
if [ $status -ne 0 ]; then
28
	echo -e "$ROUGE""One or several functional tests failed"
29
	exit $status
30
fi
31

Remi Perenon's avatar
Remi Perenon committed
32
exit 0