Update pbr requirement version in setup.py
[yardstick.git] / run_tests.sh
1 #!/bin/bash
2
3 ##############################################################################
4 # Copyright (c) 2015 Ericsson AB and others.
5 #
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Apache License, Version 2.0
8 # which accompanies this distribution, and is available at
9 # http://www.apache.org/licenses/LICENSE-2.0
10 ##############################################################################
11
12 # Run yardstick's test suite(s)
13
14 run_flake8() {
15     echo -n "Running flake8 ... "
16     logfile=pep8.log
17     flake8 yardstick > $logfile
18     if [ $? -ne 0 ]; then
19         echo "FAILED, result in $logfile"
20         exit 1
21     else
22         echo "OK, result in $logfile"
23     fi
24 }
25
26 run_tests() {
27     echo -n "Running unittest ... "
28     python -m unittest discover -s tests/unit
29     if [ $? -ne 0 ]; then
30         echo "FAILED, result in $logfile"
31         exit 1
32     else
33         echo "OK, result in $logfile"
34     fi
35 }
36
37 run_flake8
38 #run_tests
39