~alecu/ubuntuone-control-panel/the-outer-limits

1 by natalia.bidart at canonical
Initial directory structure for new project.
1
#! /bin/bash
2
#
1.1.3 by natalia.bidart at canonical
Adding several glade files and some implementations. Still rough work.
3
# Author: Natalia Bidart <natalia.bidart@canonical.com>
1 by natalia.bidart at canonical
Initial directory structure for new project.
4
#
5
# Copyright 2010 Canonical Ltd.
6
#
7
# This program is free software: you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License version 3, as published
9
# by the Free Software Foundation.
10
#
11
# This program is distributed in the hope that it will be useful, but
12
# WITHOUT ANY WARRANTY; without even the implied warranties of
13
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
14
# PURPOSE.  See the GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License along
17
# with this program.  If not, see <http://www.gnu.org/licenses/>.
18
17.1.3 by Natalia B. Bidart
MAking tets runners fail of something went wrong.
19
set -e
20
1 by natalia.bidart at canonical
Initial directory structure for new project.
21
if [ $# -ne 0 ]; then
24.1.3 by Natalia B. Bidart
Improved test runner.
22
    # an extra argument was given
23
    if [ $1 == "--integration" ]; then
24
        # run only integration tests
25
        MODULE="ubuntuone/controlpanel/integrationtests"
26
    else
27
        if [ $1 == "--unittests" ]; then
28
            # run only non-integration tests (unittests)
29
            MODULE="ubuntuone/controlpanel/tests"
30
        else
31
            # run specific module given by the caller
32
            MODULE="$@"
33
        fi
34
    fi
1 by natalia.bidart at canonical
Initial directory structure for new project.
35
else
24.1.3 by Natalia B. Bidart
Improved test runner.
36
    # run all tests, useful for tarmac and reviews
3.1.3 by natalia.bidart at canonical
So many improvements that I cna't list them all.
37
    MODULE="ubuntuone/controlpanel"
1 by natalia.bidart at canonical
Initial directory structure for new project.
38
fi
39
3.1.3 by natalia.bidart at canonical
So many improvements that I cna't list them all.
40
style_check() {
32.2.8 by Natalia B. Bidart
Change device errors are now handled.
41
    pylint ubuntuone/
3.1.3 by natalia.bidart at canonical
So many improvements that I cna't list them all.
42
    if [ -x `which pep8` ]; then
7.1.9 by natalia.bidart at canonical
Adding the GreyableBin to the tree.
43
        pep8 --repeat ubuntuone/
3.1.3 by natalia.bidart at canonical
So many improvements that I cna't list them all.
44
    else
45
        echo "Please install the 'pep8' package."
46
    fi
47
}
48
1 by natalia.bidart at canonical
Initial directory structure for new project.
49
echo "Running test suite for ""$MODULE"
3.1.3 by natalia.bidart at canonical
So many improvements that I cna't list them all.
50
`which xvfb-run` u1trial "$MODULE" && style_check
1 by natalia.bidart at canonical
Initial directory structure for new project.
51
rm -rf _trial_temp