Changeset a18d19 in indico
- Timestamp:
- 11/22/10 18:41:18 (3 years ago)
- Branches:
- master, burotel, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, b8c30da8ebdbdcbd675a873997cc3e95f567de49, 4287315ec967a3da168d83963c14001db8487d53
- Children:
- 483106
- Parents:
- 69258c
- git-author:
- Pedro Ferreira <jose.pedro.ferreira@…> (11/22/10 18:09:36)
- git-committer:
- Pedro Ferreira <jose.pedro.ferreira@…> (11/22/10 18:41:18)
- Location:
- indico/tests
- Files:
-
- 2 edited
-
runners.py (modified) (7 diffs)
-
util.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
indico/tests/runners.py
r69258c ra18d19 145 145 146 146 147 class XMLOutputOption(Option): 148 149 def use_xml_output(self, obj, fname, args): 150 151 if self.value: 152 args += ['--with-xunit', '--xunit-file=build/%s-results.xml' % fname] 153 else: 154 args += ['-v'] 155 156 147 157 class UnitTestRunner(BaseTestRunner): 148 158 """ … … 156 166 'specify': Option, 157 167 'log': LogToConsoleTestOption, 158 'xml': Option}168 'xml': XMLOutputOption } 159 169 160 170 def _run(self): … … 166 176 #retrieving tests from tests folder 167 177 args = ['nose', '--nologcapture', '--logging-clear-handlers', \ 168 '--with-id', '- v', '-s']169 170 if self.options.valueOf('xml'):171 args += ['--with-xunit', '--xunit-file=build/test-results.xml']178 '--with-id', '-s'] 179 180 # will set args 181 self._callOptions('use_xml_output', 'unit', args) 172 182 173 183 specific = self.options.valueOf('specify') … … 220 230 'specify': Option, 221 231 'threads': Option, 222 'repeat': Option} 232 'repeat': Option, 233 'xml': XMLOutputOption } 223 234 224 235 … … 238 249 239 250 240 args = ['nose', '--nologcapture', '--logging-clear-handlers', 241 '-v'] 251 args = ['nose', '--nologcapture', '--logging-clear-handlers'] 252 253 # will set args 254 self._callOptions('use_xml_output', 'functional', args) 242 255 243 256 specific = self.options.valueOf('specify') … … 310 323 311 324 try: 325 fout = open('build/selenium.stdout.log','w') 326 ferr = open('build/selenium.stderr.log', 'w') 327 312 328 self.child = subprocess.Popen(["java", "-jar", 313 329 os.path.join(self.setupDir, … … 315 331 'functional', 316 332 TestConfig.getInstance(). 317 getSeleniumFilename())], 318 stdout=None) 333 getSeleniumFilename()), 334 '-log', 'build/selenium.log', 335 '-browserSideLog'], 336 stdout = fout, 337 stderr = ferr) 319 338 320 339 except OSError, e: -
indico/tests/util.py
rdfc79a ra18d19 24 24 """ 25 25 26 import os, time 26 import os, time, logging 27 27 from multiprocessing import Process 28 28 from StringIO import StringIO 29 29 30 30 from ZEO.runzeo import ZEOOptions, ZEOServer 31 32 33 class SilentZEOServer(ZEOServer): 34 """ 35 A ZEO Server that doesn't write on the console 36 """ 37 def setup_default_logging(self): 38 # do nothing, just use whatever handler is available 39 pass 31 40 32 41 … … 39 48 self.options = ZEOOptions() 40 49 self.options.realize(['-f', fd, '-a', '%s:%d' % (hostname, port)]) 41 self.server = ZEOServer(self.options)50 self.server = SilentZEOServer(self.options) 42 51 43 52 def run(self):
Note: See TracChangeset
for help on using the changeset viewer.
