@@ -2128,7 +2128,7 @@ def do_POST(self):
2128
2128
self .send_response (200 )
2129
2129
self .end_headers ()
2130
2130
else :
2131
- print (f'do_POST: unexpected POST: { urlinfo . query } ' )
2131
+ print (f'do_POST: unexpected POST: { urlinfo } ' )
2132
2132
2133
2133
def do_GET (self ):
2134
2134
info = urlparse (self .path )
@@ -2317,6 +2317,10 @@ def assert_out_queue_empty(self, who):
2317
2317
def run_browser (self , html_file , expected = None , message = None , timeout = None , extra_tries = 1 ):
2318
2318
if not has_browser ():
2319
2319
return
2320
+ assert '?' not in html_file , 'URL params not supported'
2321
+ url = html_file
2322
+ if self .capture_stdio :
2323
+ url += '?capture_stdio'
2320
2324
if self .skip_exec :
2321
2325
self .skipTest ('skipping test execution: ' + self .skip_exec )
2322
2326
if BrowserCore .unresponsive_tests >= BrowserCore .MAX_UNRESPONSIVE_TESTS :
@@ -2328,7 +2332,7 @@ def run_browser(self, html_file, expected=None, message=None, timeout=None, extr
2328
2332
if expected is not None :
2329
2333
try :
2330
2334
self .harness_in_queue .put ((
2331
- 'http://localhost:%s/%s' % (self .PORT , html_file ),
2335
+ 'http://localhost:%s/%s' % (self .PORT , url ),
2332
2336
self .get_dir (),
2333
2337
))
2334
2338
if timeout is None :
@@ -2357,6 +2361,9 @@ def run_browser(self, html_file, expected=None, message=None, timeout=None, extr
2357
2361
if extra_tries > 0 :
2358
2362
print ('[test error (see below), automatically retrying]' )
2359
2363
print (e )
2364
+ if not self .capture_stdio :
2365
+ print ('[enabling stdio/stderr reporting]' )
2366
+ self .capture_stdio = True
2360
2367
return self .run_browser (html_file , expected , message , timeout , extra_tries - 1 )
2361
2368
else :
2362
2369
raise e
@@ -2433,10 +2440,7 @@ def btest(self, filename, expected=None,
2433
2440
output = self .run_js ('test.js' )
2434
2441
self .assertContained ('RESULT: ' + expected [0 ], output )
2435
2442
else :
2436
- url = outfile
2437
- if self .capture_stdio :
2438
- url += "?capture_stdio"
2439
- self .run_browser (url , expected = ['/report_result?' + e for e in expected ], timeout = timeout , extra_tries = extra_tries )
2443
+ self .run_browser (outfile , expected = ['/report_result?' + e for e in expected ], timeout = timeout , extra_tries = extra_tries )
2440
2444
2441
2445
2442
2446
###################################################################################################
0 commit comments