Merge lp:~ralsina/ubuntuone-windows-installer/fix_800330 into lp:ubuntuone-windows-installer

Proposed by Roberto Alsina
Status: Merged
Approved by: Natalia Bidart
Approved revision: 8
Merged at revision: 6
Proposed branch: lp:~ralsina/ubuntuone-windows-installer/fix_800330
Merge into: lp:ubuntuone-windows-installer
Diff against target: 47 lines (+43/-0)
1 file modified
run-tests (+43/-0)
To merge this branch: bzr merge lp:~ralsina/ubuntuone-windows-installer/fix_800330
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Review via email: mp+65400@code.launchpad.net

Commit message

Add a script to run style checks and (eventually) unit tests.

Description of the change

Add a script to run style checks and (eventually) unit tests.

To post a comment you must log in.
5. By Roberto Alsina

Link to bug

6. By Roberto Alsina

removed gtk bits

7. By Roberto Alsina

don't ignore the qt tests

8. By Roberto Alsina

remove useless var

Revision history for this message
Natalia Bidart (nataliabidart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'run-tests'
2--- run-tests 1970-01-01 00:00:00 +0000
3+++ run-tests 2011-06-21 20:04:02 +0000
4@@ -0,0 +1,43 @@
5+#! /bin/bash
6+#
7+# Author: Natalia Bidart <natalia.bidart@canonical.com>
8+#
9+# Copyright 2010 Canonical Ltd.
10+#
11+# This program is free software: you can redistribute it and/or modify it
12+# under the terms of the GNU General Public License version 3, as published
13+# by the Free Software Foundation.
14+#
15+# This program is distributed in the hope that it will be useful, but
16+# WITHOUT ANY WARRANTY; without even the implied warranties of
17+# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
18+# PURPOSE. See the GNU General Public License for more details.
19+#
20+# You should have received a copy of the GNU General Public License along
21+# with this program. If not, see <http://www.gnu.org/licenses/>.
22+
23+set -e
24+
25+if [ $# -ne 0 ]; then
26+ # run specific module given by the caller
27+ MODULE="$@"
28+else
29+ # run all tests, useful for tarmac and reviews
30+ MODULE="ubuntuone_installer"
31+fi
32+
33+style_check() {
34+ pylint --ignore ui ubuntuone_installer/
35+ if [ -x `which pep8` ]; then
36+ pep8 --exclude '.svn,CVS,.bzr,.hg,.git,*_ui.py,*_rc.py' --repeat bin/ $MODULE
37+ else
38+ echo "Please install the 'pep8' package."
39+ fi
40+}
41+
42+./setup.py build
43+echo "Running test suite for ""$MODULE"
44+`which xvfb-run` u1trial "$MODULE"
45+style_check
46+rm -rf _trial_temp
47+rm -rf build

Subscribers

People subscribed via source and target branches