Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: run_jstests.py

Issue 848503003: Fix printing of logged non-ascii characters (Closed) Base URL: https://code.google.com/p/dom-distiller/@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Runs DomDistillers jstests. 6 """Runs DomDistillers jstests.
7 7
8 This uses ChromeDriver (https://sites.google.com/a/chromium.org/chromedriver/) t o run the jstests. 8 This uses ChromeDriver (https://sites.google.com/a/chromium.org/chromedriver/) t o run the jstests.
9 This requires that the ChromeDriver executable is on the PATH and that Selenium WebDriver is 9 This requires that the ChromeDriver executable is on the PATH and that Selenium WebDriver is
10 installed. 10 installed.
(...skipping 15 matching lines...) Expand all
26 start = time.time() 26 start = time.time()
27 27
28 test_runner = "return com.dom_distiller.client.JsTestEntry.run()"; 28 test_runner = "return com.dom_distiller.client.JsTestEntry.run()";
29 test_html = os.path.abspath(os.path.join(os.path.dirname(__file__), "war", "test .html")) 29 test_html = os.path.abspath(os.path.join(os.path.dirname(__file__), "war", "test .html"))
30 30
31 driver = webdriver.Chrome() 31 driver = webdriver.Chrome()
32 driver.get("file://" + test_html) 32 driver.get("file://" + test_html)
33 result = driver.execute_script(test_runner) 33 result = driver.execute_script(test_runner)
34 driver.quit() 34 driver.quit()
35 end = time.time() 35 end = time.time()
36 print result['log'] 36 print result['log'].encode('utf-8')
37 print 'Tests run: %d, Failures: %d, Skipped: %d, Time elapsed: %0.3f sec' % (res ult['numTests'], 37 print 'Tests run: %d, Failures: %d, Skipped: %d, Time elapsed: %0.3f sec' % (res ult['numTests'],
38 result['failed'], result['skipped'], end - start) 38 result['failed'], result['skipped'], end - start)
39 sys.exit(0 if result['success'] else 1) 39 sys.exit(0 if result['success'] else 1)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698