Merge lp:~brian.curtin/ubuntu-sso-client/run-tests-buildout-cleanup into lp:ubuntu-sso-client

Proposed by Brian Curtin on 2012-04-17
Status: Merged
Approved by: dobey on 2012-04-20
Approved revision: 949
Merged at revision: 948
Proposed branch: lp:~brian.curtin/ubuntu-sso-client/run-tests-buildout-cleanup
Merge into: lp:ubuntu-sso-client
Diff against target: 118 lines (+25/-57)
1 file modified
run-tests.bat (+25/-57)
To merge this branch: bzr merge lp:~brian.curtin/ubuntu-sso-client/run-tests-buildout-cleanup
Reviewer Review Type Date Requested Status
dobey (community) Approve on 2012-04-20
Diego Sarmentero (community) 2012-04-17 Approve on 2012-04-20
Review via email: mp+102393@code.launchpad.net

Commit message

- Make run-tests.bat work with the new buildout environment.

Description of the change

Allow run-tests.bat to work with the new buildout environment.

This depends on lp:~brian.curtin/ubuntuone-windows-installer/buildout-env

To post a comment you must log in.
945. By Manuel de la Peña on 2012-04-18

- Fixed all those broken tests on windows related to the dirty reactor left by twisted.pb (LP: #960436).

946. By Manuel de la Peña on 2012-04-18

- Added the use of the new added webserver that cleans resources correctly (LP: #960436).

947. By Manuel de la Peña on 2012-04-18

- Fixed tcp activation tests to clean resources correctly (LP: #960436).

Diego Sarmentero (diegosarmentero) wrote :

I think this is wrong:

You are removing:

-:: Copyright 2010-12 Canonical Ltd.

And adding:

+:: Author: Manuel de la Pena <email address hidden>
+::
+:: Copyright 2010 Canonical Ltd.

review: Needs Fixing
948. By Brian Curtin on 2012-04-20

fix copyright header

Diego Sarmentero (diegosarmentero) wrote :

+1

review: Approve
dobey (dobey) wrote :

8 -::
9 -:: In addition, as a special exception, the copyright holders give
10 -:: permission to link the code of portions of this program with the
11 -:: OpenSSL library under certain conditions as described in each
12 -:: individual source file, and distribute linked combinations
13 -:: including the two.
14 -:: You must obey the GNU General Public License in all respects
15 -:: for all of the code used other than OpenSSL. If you modify
16 -:: file(s) with this exception, you may extend this exception to your
17 -:: version of the file(s), but you are not obligated to do so. If you
18 -:: do not wish to do so, delete this exception statement from your
19 -:: version. If you delete this exception statement from all source
20 -:: files in the program, then also delete it here.

You can't remove that. It's part of the license header. :)

review: Needs Fixing
949. By Brian Curtin on 2012-04-20

put the header back to how it was, again

dobey (dobey) :
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-09 17:38:24 +0000
3+++ run-tests.bat 2012-04-20 17:11:21 +0000
4@@ -27,60 +27,22 @@
5
6 @ECHO off
7
8-:: We could have Python 2.6 or 2.7 on Windows. In order to check availability,
9-:: we should first check for 2.7, and run the tests, otherwise fall back to 2.6.
10-SET REGQUERY27="REG QUERY HKLM\Software\Python\PythonCore\2.7\InstallPath /ve"
11-SET REGQUERY2732="REG QUERY HKLM\Software\Wow6432Node\Python\PythonCore\2.7\InstallPath /ve"
12-SET REGQUERY26="REG QUERY HKLM\Software\Python\PythonCore\2.6\InstallPath /ve"
13-SET REGQUERY2632="REG QUERY HKLM\Software\Wow6432Node\Python\PythonCore\2.6\InstallPath /ve"
14 SET PYTHONEXEPATH=""
15
16-:: This is very annoying; FOR /F will work differently depending on the output
17-:: of reg which is not consistent between OS versions (XP, 7). We must choose
18-:: the tokens according to OS version.
19-::
20-SET PYTHONPATHTOKENS=3
21-VER | FIND "XP" > nul
22-IF %ERRORLEVEL% == 0 (
23- SET PYTHONPATHTOKENS=4)
24-
25-ECHO Checking if python 2.7 is in the system
26-
27-:: Look for python 2.7
28-FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('%REGQUERY27%') DO @SET PYTHONEXEPATH=%%A
29-
30-IF NOT %PYTHONEXEPATH% == "" (
31- GOTO :PYTHONPRESENT)
32-
33-ECHO Checking if python 2.6 is in the system
34-:: we do not have python 2.7 in the system, try to find 2.6
35-FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('%REGQUERY26%') DO @SET PYTHONEXEPATH=%%A
36-
37-IF NOT %PYTHONEXEPATH% == "" (
38- GOTO :PYTHONPRESENT)
39-
40-:: we do not have python (2.6 or 2.7) this could hapen in the case that the
41-:: user installed the 32version in a 64 machine, let check if the software was installed in the wow key
42-
43-:: Look for python 2.7 in WoW64
44-ECHO Checking if python 2.7 32 is in the system
45-FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('%REGQUERY2732%') DO @SET PYTHONEXEPATH=%%A
46-
47-IF NOT %PYTHONEXEPATH% == "" (
48- GOTO :PYTHONPRESENT)
49-
50-ECHO Checking if python 2.6 32 is in the system
51-:: we do not have python 2.7 in the system, try to find 2.6
52-FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('%REGQUERY2632%') DO @SET PYTHONEXEPATH=%%A
53-IF NOT %PYTHONEXEPATH% == "" (
54- GOTO :PYTHONPRESENT)
55-
56+set PYTHONPATH=.
57+
58+ECHO Checking for Python on the path
59+:: Look for Python from buildout
60+FOR %%A in (python.exe) do (SET PYTHONEXEPATH=%%~$PATH:A)
61+FOR %%B in (u1trial) do (SET TRIALPATH=%%~$PATH:B)
62+FOR %%C in (u1lint) do (SET LINTPATH=%%~$PATH:C)
63+FOR %%D in (pep8.exe) do (SET PEP8PATH=%%~$PATH:D)
64+
65+IF NOT "%PYTHONEXEPATH%" == "" GOTO :PYTHONPRESENT
66 ECHO Please ensure you have python installed
67 GOTO :END
68
69-
70 :PYTHONPRESENT
71-
72 :: throw the first parameter away if is /skip-lint,
73 :: the way we do this is to ensure that /skip-lint
74 :: is the first parameter and copy all the rest in a loop
75@@ -106,16 +68,16 @@
76 GOTO GETREST
77 :CONTINUEBATCH
78
79-ECHO Python found, building auto-generated modules...
80+ECHO Python found at %PYTHONEXEPATH%, building auto-generated modules...
81 :: call setup.py build so that the qt uic is called
82 ::START "Build code" /D%CD% /WAIT "%PYTHONEXEPATH%\python.exe" setup.py build
83-"%PYTHONEXEPATH%\python.exe" setup.py build
84+"%PYTHONEXEPATH%" setup.py build
85 ECHO Running tests
86 :: execute the tests with a number of ignored linux only modules
87-"%PYTHONEXEPATH%\python.exe" "%PYTHONEXEPATH%\Scripts\u1trial" -i "test_linux.py, test_txsecrets.py, test_qt.py, test_glib.py" -p "ubuntu_sso\gtk" --reactor=qt4 --gui %PARAMS% ubuntu_sso
88+"%PYTHONEXEPATH%" "%TRIALPATH%" -i "test_linux.py, test_txsecrets.py, test_qt.py, test_glib.py" -p "ubuntu_sso\gtk" --reactor=qt4 --gui %PARAMS% ubuntu_sso
89 :: Clean the build from the setupt.py
90-ECHO Cleaning the generated code
91-"%PYTHONEXEPATH%\python.exe" setup.py clean
92+ECHO Cleaning the generated code before running the style checks...
93+"%PYTHONEXEPATH%" setup.py clean
94
95 IF %SKIPLINT% == 1 (
96 ECHO Skipping style checks
97@@ -123,11 +85,17 @@
98
99 ECHO Performing style checks...
100 SET IGNORE_LINT="ubuntu_sso\gtk,ubuntu_sso\networkstate\linux.py,ubuntu_sso\main\linux.py,ubuntu_sso\main\tests\test_linux.py,ubuntu_sso\utils\txsecrets.py,ubuntu_sso\utils\tests\test_txsecrets.py,ubuntu_sso\tests\bin,bin\ubuntu-sso-login"
101-"%PYTHONEXEPATH%\python.exe" "%PYTHONEXEPATH%\Scripts\u1lint" -i "%IGNORE_LINT%" ubuntu_sso
102+"%PYTHONEXEPATH%" "%LINTPATH%" -i "%IGNORE_LINT%" ubuntu_sso
103 :: test for style if we can, if pep8 is not present, move to the end
104-"%PYTHONEXEPATH%\Scripts\pep8.exe" --repeat .
105+ECHO Running PEP-8 Check...
106+"%PEP8PATH%" --repeat .
107 :CLEAN
108+
109+IF EXIST \.coverage RMDIR /s /q \.coverage
110 :: Delete the temp folders
111-RMDIR /q /s _trial_temp
112-DEL /q .coverage
113+IF "%TRIAL_TEMP_DIR%" == "" GOTO :TRIALTEMPEXISTS
114+IF EXIST _trial_temp RMDIR /s /s _trial_temp
115+:TRIALTEMPEXISTS
116+IF EXIST "%TRIAL_TEMP_DIR%" RMDIR /s /s "%TRIAL_TEMP_DIR%"
117+
118 :END

Subscribers

People subscribed via source and target branches