Merge lp:~mandel/ubuntuone-dev-tools/params-runtests into lp:ubuntuone-dev-tools

Proposed by Manuel de la Peña on 2012-04-20
Status: Merged
Approved by: Manuel de la Peña on 2012-04-20
Approved revision: 65
Merged at revision: 65
Proposed branch: lp:~mandel/ubuntuone-dev-tools/params-runtests
Merge into: lp:ubuntuone-dev-tools
Diff against target: 52 lines (+33/-1)
1 file modified
run-tests.bat (+33/-1)
To merge this branch: bzr merge lp:~mandel/ubuntuone-dev-tools/params-runtests
Reviewer Review Type Date Requested Status
Diego Sarmentero (community) 2012-04-20 Approve on 2012-04-20
Review via email: mp+102836@code.launchpad.net

Commit message

- Pass the parameters provided to the runtests.bat to u1trial and allow to skip the lint checks (LP: #986144).

Description of the change

- Pass the parameters provided to the runtests.bat to u1trial and allow to skip the lint checks (LP: #986144).

To post a comment you must log in.
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 2012-04-20 10:48:38 +0000
3+++ run-tests.bat 2012-04-20 11:43:25 +0000
4@@ -80,15 +80,47 @@
5 GOTO :END
6
7 :PYTHONPRESENT
8+
9+:: throw the first parameter away if is /skip-lint,
10+:: the way we do this is to ensure that /skip-lint
11+:: is the first parameter and copy all the rest in a loop
12+:: the main reason for that is that %* is not affected
13+:: by SHIFT, that is, it allways have all passed parameters
14+
15+SET PARAMS=%*
16+SET SKIPLINT=0
17+IF "%1" == "/skip-lint" (
18+ SET SKIPLINT=1
19+ GOTO :CLEANPARAMS
20+)ELSE (
21+ GOTO :CONTINUEBATCH)
22+
23+:CLEANPARAMS
24+SHIFT
25+SET PARAMS=%1
26+:GETREST
27+SHIFT
28+if [%1]==[] (
29+ GOTO CONTINUEBATCH)
30+SET PARAMS=%PARAMS% %1
31+GOTO GETREST
32+:CONTINUEBATCH
33+
34 ECHO Python found, executing the tests...
35 :: execute the tests with a number of ignored linux only modules
36-"%PYTHONEXEPATH%\python.exe" bin/u1trial --reactor=twisted -c ubuntuone
37+"%PYTHONEXEPATH%\python.exe" bin/u1trial --reactor=twisted -c %PARAMS% ubuntuone
38+
39+IF %SKIPLINT% == 1 (
40+ ECHO Skipping style checks
41+ GOTO :CLEAN)
42+
43 "%PYTHONEXEPATH%\python.exe" bin/u1lint
44 :: test for style if we can, if pep8 is not present, move to the end
45 IF EXIST "%PYTHONEXEPATH%Scripts\pep8.exe"
46 START "Pep8" /B "%PYTHONEXEPATH%\Scripts\pep8.exe" --repeat
47 ELSE
48 ECHO Style checks were not done
49+:CLEAN
50 :: Delete the temp folders
51 RMDIR /s /q _trial_temp
52 RMDIR /s /q .coverage

Subscribers

People subscribed via source and target branches

to all changes: