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

Proposed by Brian Curtin
Status: Merged
Approved by: dobey
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
Diego Sarmentero (community) Approve
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

- 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

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

947. By Manuel de la Peña

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

Revision history for this message
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

fix copyright header

Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

+1

review: Approve
Revision history for this message
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

put the header back to how it was, again

Revision history for this message
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'run-tests.bat'
--- run-tests.bat 2012-04-09 17:38:24 +0000
+++ run-tests.bat 2012-04-20 17:11:21 +0000
@@ -27,60 +27,22 @@
2727
28@ECHO off28@ECHO off
2929
30:: We could have Python 2.6 or 2.7 on Windows. In order to check availability,
31:: we should first check for 2.7, and run the tests, otherwise fall back to 2.6.
32SET REGQUERY27="REG QUERY HKLM\Software\Python\PythonCore\2.7\InstallPath /ve"
33SET REGQUERY2732="REG QUERY HKLM\Software\Wow6432Node\Python\PythonCore\2.7\InstallPath /ve"
34SET REGQUERY26="REG QUERY HKLM\Software\Python\PythonCore\2.6\InstallPath /ve"
35SET REGQUERY2632="REG QUERY HKLM\Software\Wow6432Node\Python\PythonCore\2.6\InstallPath /ve"
36SET PYTHONEXEPATH=""30SET PYTHONEXEPATH=""
3731
38:: This is very annoying; FOR /F will work differently depending on the output32set PYTHONPATH=.
39:: of reg which is not consistent between OS versions (XP, 7). We must choose33
40:: the tokens according to OS version.34ECHO Checking for Python on the path
41::35:: Look for Python from buildout
42SET PYTHONPATHTOKENS=336FOR %%A in (python.exe) do (SET PYTHONEXEPATH=%%~$PATH:A)
43VER | FIND "XP" > nul37FOR %%B in (u1trial) do (SET TRIALPATH=%%~$PATH:B)
44IF %ERRORLEVEL% == 0 (38FOR %%C in (u1lint) do (SET LINTPATH=%%~$PATH:C)
45 SET PYTHONPATHTOKENS=4)39FOR %%D in (pep8.exe) do (SET PEP8PATH=%%~$PATH:D)
4640
47ECHO Checking if python 2.7 is in the system41IF NOT "%PYTHONEXEPATH%" == "" GOTO :PYTHONPRESENT
48
49:: Look for python 2.7
50FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('%REGQUERY27%') DO @SET PYTHONEXEPATH=%%A
51
52IF NOT %PYTHONEXEPATH% == "" (
53 GOTO :PYTHONPRESENT)
54
55ECHO Checking if python 2.6 is in the system
56:: we do not have python 2.7 in the system, try to find 2.6
57FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('%REGQUERY26%') DO @SET PYTHONEXEPATH=%%A
58
59IF NOT %PYTHONEXEPATH% == "" (
60 GOTO :PYTHONPRESENT)
61
62:: we do not have python (2.6 or 2.7) this could hapen in the case that the
63:: user installed the 32version in a 64 machine, let check if the software was installed in the wow key
64
65:: Look for python 2.7 in WoW64
66ECHO Checking if python 2.7 32 is in the system
67FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('%REGQUERY2732%') DO @SET PYTHONEXEPATH=%%A
68
69IF NOT %PYTHONEXEPATH% == "" (
70 GOTO :PYTHONPRESENT)
71
72ECHO Checking if python 2.6 32 is in the system
73:: we do not have python 2.7 in the system, try to find 2.6
74FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('%REGQUERY2632%') DO @SET PYTHONEXEPATH=%%A
75IF NOT %PYTHONEXEPATH% == "" (
76 GOTO :PYTHONPRESENT)
77
78ECHO Please ensure you have python installed42ECHO Please ensure you have python installed
79GOTO :END43GOTO :END
8044
81
82:PYTHONPRESENT45:PYTHONPRESENT
83
84:: throw the first parameter away if is /skip-lint,46:: throw the first parameter away if is /skip-lint,
85:: the way we do this is to ensure that /skip-lint47:: the way we do this is to ensure that /skip-lint
86:: is the first parameter and copy all the rest in a loop48:: is the first parameter and copy all the rest in a loop
@@ -106,16 +68,16 @@
106GOTO GETREST68GOTO GETREST
107:CONTINUEBATCH69:CONTINUEBATCH
10870
109ECHO Python found, building auto-generated modules...71ECHO Python found at %PYTHONEXEPATH%, building auto-generated modules...
110:: call setup.py build so that the qt uic is called72:: call setup.py build so that the qt uic is called
111::START "Build code" /D%CD% /WAIT "%PYTHONEXEPATH%\python.exe" setup.py build73::START "Build code" /D%CD% /WAIT "%PYTHONEXEPATH%\python.exe" setup.py build
112"%PYTHONEXEPATH%\python.exe" setup.py build74"%PYTHONEXEPATH%" setup.py build
113ECHO Running tests75ECHO Running tests
114:: execute the tests with a number of ignored linux only modules76:: execute the tests with a number of ignored linux only modules
115"%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 77"%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
116:: Clean the build from the setupt.py78:: Clean the build from the setupt.py
117ECHO Cleaning the generated code79ECHO Cleaning the generated code before running the style checks...
118"%PYTHONEXEPATH%\python.exe" setup.py clean80"%PYTHONEXEPATH%" setup.py clean
11981
120IF %SKIPLINT% == 1 (82IF %SKIPLINT% == 1 (
121 ECHO Skipping style checks83 ECHO Skipping style checks
@@ -123,11 +85,17 @@
12385
124ECHO Performing style checks...86ECHO Performing style checks...
125SET 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"87SET 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"
126"%PYTHONEXEPATH%\python.exe" "%PYTHONEXEPATH%\Scripts\u1lint" -i "%IGNORE_LINT%" ubuntu_sso88"%PYTHONEXEPATH%" "%LINTPATH%" -i "%IGNORE_LINT%" ubuntu_sso
127:: test for style if we can, if pep8 is not present, move to the end89:: test for style if we can, if pep8 is not present, move to the end
128"%PYTHONEXEPATH%\Scripts\pep8.exe" --repeat .90ECHO Running PEP-8 Check...
91"%PEP8PATH%" --repeat .
129:CLEAN92:CLEAN
93
94IF EXIST \.coverage RMDIR /s /q \.coverage
130:: Delete the temp folders95:: Delete the temp folders
131RMDIR /q /s _trial_temp96IF "%TRIAL_TEMP_DIR%" == "" GOTO :TRIALTEMPEXISTS
132DEL /q .coverage97IF EXIST _trial_temp RMDIR /s /s _trial_temp
98:TRIALTEMPEXISTS
99IF EXIST "%TRIAL_TEMP_DIR%" RMDIR /s /s "%TRIAL_TEMP_DIR%"
100
133:END101:END

Subscribers

People subscribed via source and target branches