Merge lp:~mandel/ubuntuone-control-panel/run-tests-extra-params into lp:ubuntuone-control-panel

Proposed by Manuel de la Peña
Status: Merged
Approved by: Manuel de la Peña
Approved revision: 256
Merged at revision: 256
Proposed branch: lp:~mandel/ubuntuone-control-panel/run-tests-extra-params
Merge into: lp:ubuntuone-control-panel
Diff against target: 43 lines (+25/-3)
1 file modified
run-tests.bat (+25/-3)
To merge this branch: bzr merge lp:~mandel/ubuntuone-control-panel/run-tests-extra-params
Reviewer Review Type Date Requested Status
Roberto Alsina (community) Approve
Review via email: mp+90903@code.launchpad.net

Commit message

Forward extra params to u1trial.

Description of the change

Forward extra params to u1trial.

To post a comment you must log in.
Revision history for this message
Roberto Alsina (ralsina) wrote :

+1 tested IRL

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 2012-01-19 15:34:44 +0000
3+++ run-tests.bat 2012-01-31 17:00:16 +0000
4@@ -21,14 +21,36 @@
5 SET IGNORE_PATHS="ubuntuone\controlpanel\gui\gtk, ubuntuone\controlpanel\dbustests"
6 SET IGNORE_MODULES="test_linux.py, test_libsoup.py"
7
8+:: throw the first parameter away if is /skip-lint,
9+:: the way we do this is to ensure that /skip-lint
10+:: is the first parameter and copy all the rest in a loop
11+:: the main reason for that is that %* is not affected
12+:: by SHIFT, that is, it allways have all passed parameters
13+
14+SET PARAMS=%*
15 SET SKIPLINT=0
16-:: lets check if we pass the /skip-lint param, if we did we remember and use shift
17-if "%1" == "/skip-lint" SET SKIPLINT=1
18+IF "%1" == "/skip-lint" (
19+ SET SKIPLINT=1
20+ GOTO :CLEANPARAMS
21+)ELSE (
22+ GOTO :CONTINUEBATCH)
23+:CLEANPARAMS
24+
25+SHIFT
26+SET PARAMS=%1
27+:GETREST
28+SHIFT
29+if [%1]==[] (
30+ GOTO CONTINUEBATCH)
31+SET PARAMS=%PARAMS% %1
32+GOTO GETREST
33+:CONTINUEBATCH
34+
35
36 "%PYTHONEXEPATH%\python.exe" setup.py build
37 ECHO Running tests
38 :: execute the tests with a number of ignored linux only modules
39-"%PYTHONEXEPATH%\python.exe" "%PYTHONEXEPATH%\Scripts\u1trial" --reactor=qt4 --gui -p %IGNORE_PATHS% -i %IGNORE_MODULES% %MODULE%
40+"%PYTHONEXEPATH%\python.exe" "%PYTHONEXEPATH%\Scripts\u1trial" --reactor=qt4 --gui -p %IGNORE_PATHS% -i %IGNORE_MODULES% %PARAMS% %MODULE%
41 :: Clean the build from the setupt.py
42 ECHO Cleaning the generated code
43 "%PYTHONEXEPATH%\python.exe" setup.py clean

Subscribers

People subscribed via source and target branches

to all changes: