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

Side by Side Diff: tools/testrunner/local/commands.py

Issue 2086143003: Remove invalid UTF-8 characters from test output (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 # Copyright 2012 the V8 project authors. All rights reserved. 1 # Copyright 2012 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 timeout_result = [False] 104 timeout_result = [False]
105 105
106 timer = Timer(timeout, kill_process, [process, timeout_result]) 106 timer = Timer(timeout, kill_process, [process, timeout_result])
107 timer.start() 107 timer.start()
108 stdout, stderr = process.communicate() 108 stdout, stderr = process.communicate()
109 timer.cancel() 109 timer.cancel()
110 110
111 return output.Output( 111 return output.Output(
112 process.returncode, 112 process.returncode,
113 timeout_result[0], 113 timeout_result[0],
114 stdout, 114 stdout.decode('utf-8', 'replace').encode('utf-8'),
115 stderr, 115 stderr.decode('utf-8', 'replace').encode('utf-8'),
116 process.pid, 116 process.pid,
117 ) 117 )
118 118
119 119
120 def Execute(args, verbose=False, timeout=None): 120 def Execute(args, verbose=False, timeout=None):
121 args = [ c for c in args if c != "" ] 121 args = [ c for c in args if c != "" ]
122 return RunProcess(verbose, timeout, args=args) 122 return RunProcess(verbose, timeout, args=args)
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