Merge lp:~mandel/ubuntuone-control-panel/skip-lint into lp:ubuntuone-control-panel

Proposed by Manuel de la Peña on 2012-01-19
Status: Merged
Approved by: Manuel de la Peña on 2012-01-19
Approved revision: 252
Merged at revision: 252
Proposed branch: lp:~mandel/ubuntuone-control-panel/skip-lint
Merge into: lp:ubuntuone-control-panel
Diff against target: 81 lines (+40/-35)
1 file modified
run-tests.bat (+40/-35)
To merge this branch: bzr merge lp:~mandel/ubuntuone-control-panel/skip-lint
Reviewer Review Type Date Requested Status
Diego Sarmentero (community) Approve on 2012-01-19
Roberto Alsina (community) 2012-01-19 Approve on 2012-01-19
Review via email: mp+89260@code.launchpad.net

Commit message

Adds the possibility to skip the lint checks on windows when passing the /skip-lint parameter to run-tests.bat.

Description of the change

Adds the possibility to skip the lint checks on windows when passing the /skip-lint parameter to run-tests.bat.

To post a comment you must log in.
Roberto Alsina (ralsina) wrote :

+1

review: Approve
Diego Sarmentero (diegosarmentero) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'run-tests.bat'
2--- run-tests.bat 2011-12-27 18:48:44 +0000
3+++ run-tests.bat 2012-01-19 14:52:32 +0000
4@@ -1,37 +1,42 @@
5-:: Author: Natalia B. Bidart <natalia.bidart@canonical.com>
6-::
7-:: Copyright 2011 Canonical Ltd.
8-::
9-:: This program is free software: you can redistribute it and/or modify it
10-:: under the terms of the GNU General Public License version 3, as published
11-:: by the Free Software Foundation.
12-::
13-:: This program is distributed in the hope that it will be useful, but
14-:: WITHOUT ANY WARRANTY; without even the implied warranties of
15-:: MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
16-:: PURPOSE. See the GNU General Public License for more details.
17-::
18-:: You should have received a copy of the GNU General Public License along
19-:: with this program. If not, see <http://www.gnu.org/licenses/>.
20-
21-:: call setup.py build so that the qt uic is called
22-
23-@ECHO off
24-
25-SET MODULE="ubuntuone"
26-SET PYTHONEXEPATH="C:\Python27"
27-SET IGNORE_PATHS="ubuntuone\controlpanel\gui\gtk, ubuntuone\controlpanel\dbustests"
28+:: Copyright 2011-12 Canonical Ltd.
29+::
30+:: This program is free software: you can redistribute it and/or modify it
31+:: under the terms of the GNU General Public License version 3, as published
32+:: by the Free Software Foundation.
33+::
34+:: This program is distributed in the hope that it will be useful, but
35+:: WITHOUT ANY WARRANTY; without even the implied warranties of
36+:: MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
37+:: PURPOSE. See the GNU General Public License for more details.
38+::
39+:: You should have received a copy of the GNU General Public License along
40+:: with this program. If not, see <http://www.gnu.org/licenses/>.
41+
42+:: call setup.py build so that the qt uic is called
43+
44+@ECHO off
45+
46+SET MODULE="ubuntuone"
47+SET PYTHONEXEPATH="C:\Python27"
48+SET IGNORE_PATHS="ubuntuone\controlpanel\gui\gtk, ubuntuone\controlpanel\dbustests"
49 SET IGNORE_MODULES="test_linux.py, test_libsoup.py"
50
51-"%PYTHONEXEPATH%\python.exe" setup.py build
52-ECHO Running tests
53-:: execute the tests with a number of ignored linux only modules
54-"%PYTHONEXEPATH%\python.exe" "%PYTHONEXEPATH%\Scripts\u1trial" --reactor=qt4 --gui -p %IGNORE_PATHS% -i %IGNORE_MODULES% %MODULE%
55-:: Clean the build from the setupt.py
56-ECHO Cleaning the generated code before running the style checks...
57-"%PYTHONEXEPATH%\python.exe" setup.py clean
58-ECHO Performing style checks...
59-"%PYTHONEXEPATH%\python.exe" "%PYTHONEXEPATH%\Scripts\u1lint" --ignore ubuntuone\controlpanel\gui\qt\ui "%MODULE%"
60-"%PYTHONEXEPATH%\Scripts\pep8.exe" --exclude ".svn,CVS,.bzr,.hg,.git,*_ui.py,*_rc.py" --repeat . bin\*
61-:: Delete the temp folders
62-RMDIR /s /q _trial_temp
63+SET SKIPLINT=0
64+:: lets check if we pass the /skip-lint param, if we did we remember and use shift
65+if "%1" == "/skip-lint" SET SKIPLINT=1
66+
67+"%PYTHONEXEPATH%\python.exe" setup.py build
68+ECHO Running tests
69+:: execute the tests with a number of ignored linux only modules
70+"%PYTHONEXEPATH%\python.exe" "%PYTHONEXEPATH%\Scripts\u1trial" --reactor=qt4 --gui -p %IGNORE_PATHS% -i %IGNORE_MODULES% %MODULE%
71+:: Clean the build from the setupt.py
72+ECHO Cleaning the generated code
73+"%PYTHONEXEPATH%\python.exe" setup.py clean
74+
75+IF %SKIPLINT% == 1 GOTO :CLEAN
76+ECHO Performing style checks...
77+"%PYTHONEXEPATH%\python.exe" "%PYTHONEXEPATH%\Scripts\u1lint" --ignore ubuntuone\controlpanel\gui\qt\ui "%MODULE%"
78+"%PYTHONEXEPATH%\Scripts\pep8.exe" --exclude ".svn,CVS,.bzr,.hg,.git,*_ui.py,*_rc.py" --repeat . bin\*
79+:CLEAN
80+:: Delete the temp folders
81+RMDIR /s /q _trial_temp

Subscribers

People subscribed via source and target branches

to all changes: