238.13.1
by manuel.delapena at canonical
Added a new flag to skip the lint tests. |
1 |
:: Copyright 2011-12 Canonical Ltd. |
2 |
:: |
|
3 |
:: This program is free software: you can redistribute it and/or modify it |
|
4 |
:: under the terms of the GNU General Public License version 3, as published |
|
5 |
:: by the Free Software Foundation. |
|
6 |
:: |
|
7 |
:: This program is distributed in the hope that it will be useful, but |
|
8 |
:: WITHOUT ANY WARRANTY; without even the implied warranties of |
|
9 |
:: MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
|
10 |
:: PURPOSE. See the GNU General Public License for more details. |
|
11 |
:: |
|
12 |
:: You should have received a copy of the GNU General Public License along |
|
13 |
:: with this program. If not, see <http://www.gnu.org/licenses/>. |
|
14 |
||
15 |
:: call setup.py build so that the qt uic is called |
|
16 |
||
17 |
@ECHO off |
|
18 |
||
19 |
SET MODULE="ubuntuone" |
|
20 |
SET PYTHONEXEPATH="C:\Python27" |
|
21 |
SET IGNORE_PATHS="ubuntuone\controlpanel\gui\gtk, ubuntuone\controlpanel\dbustests" |
|
236.2.5
by Manuel de la Pena
Fixed branch according to review comments. |
22 |
SET IGNORE_MODULES="test_linux.py, test_libsoup.py" |
172.2.3
by Natalia B. Bidart
Setting ignore_paths for u1trial when running tests in windows. |
23 |
|
238.17.1
by Manuel de la Pena
Foward params to u1trial. |
24 |
:: throw the first parameter away if is /skip-lint, |
25 |
:: the way we do this is to ensure that /skip-lint |
|
26 |
:: is the first parameter and copy all the rest in a loop |
|
27 |
:: the main reason for that is that %* is not affected |
|
28 |
:: by SHIFT, that is, it allways have all passed parameters |
|
29 |
||
30 |
SET PARAMS=%* |
|
238.13.1
by manuel.delapena at canonical
Added a new flag to skip the lint tests. |
31 |
SET SKIPLINT=0 |
238.17.1
by Manuel de la Pena
Foward params to u1trial. |
32 |
IF "%1" == "/skip-lint" ( |
33 |
SET SKIPLINT=1 |
|
34 |
GOTO :CLEANPARAMS |
|
35 |
)ELSE ( |
|
36 |
GOTO :CONTINUEBATCH) |
|
37 |
:CLEANPARAMS |
|
38 |
||
39 |
SHIFT
|
|
40 |
SET PARAMS=%1 |
|
41 |
:GETREST |
|
42 |
SHIFT
|
|
43 |
if [%1]==[] ( |
|
44 |
GOTO CONTINUEBATCH) |
|
45 |
SET PARAMS=%PARAMS% %1 |
|
46 |
GOTO GETREST |
|
47 |
:CONTINUEBATCH |
|
48 |
||
238.13.1
by manuel.delapena at canonical
Added a new flag to skip the lint tests. |
49 |
|
50 |
"%PYTHONEXEPATH%\python.exe" setup.py build |
|
51 |
ECHO Running tests
|
|
52 |
:: execute the tests with a number of ignored linux only modules |
|
238.17.1
by Manuel de la Pena
Foward params to u1trial. |
53 |
"%PYTHONEXEPATH%\python.exe" "%PYTHONEXEPATH%\Scripts\u1trial" --reactor=qt4 --gui -p %IGNORE_PATHS% -i %IGNORE_MODULES% %PARAMS% %MODULE% |
238.13.1
by manuel.delapena at canonical
Added a new flag to skip the lint tests. |
54 |
:: Clean the build from the setupt.py |
55 |
ECHO Cleaning the generated code
|
|
56 |
"%PYTHONEXEPATH%\python.exe" setup.py clean |
|
57 |
||
58 |
IF %SKIPLINT% == 1 GOTO :CLEAN |
|
59 |
ECHO Performing style checks...
|
|
60 |
"%PYTHONEXEPATH%\python.exe" "%PYTHONEXEPATH%\Scripts\u1lint" --ignore ubuntuone\controlpanel\gui\qt\ui "%MODULE%" |
|
61 |
"%PYTHONEXEPATH%\Scripts\pep8.exe" --exclude ".svn,CVS,.bzr,.hg,.git,*_ui.py,*_rc.py" --repeat . bin\* |
|
62 |
:CLEAN |
|
63 |
:: Delete the temp folders |
|
64 |
RMDIR /s /q _trial_temp
|