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

Side by Side Diff: tools/ipc_fuzzer/play_testcase.py

Issue 864123003: IPC Fuzzer: Make it work with --disable-mojo-channel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Landing Created 5 years, 10 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 | tools/ipc_fuzzer/replay/replay_process.cc » ('j') | 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 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 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 """Wrapper around chrome. 6 """Wrapper around chrome.
7 7
8 Replaces all the child processes (renderer, GPU, plugins and utility) with the 8 Replaces all the child processes (renderer, GPU, plugins and utility) with the
9 IPC fuzzer. The fuzzer will then play back a specified testcase. 9 IPC fuzzer. The fuzzer will then play back a specified testcase.
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 '--plugin-launcher', 82 '--plugin-launcher',
83 '--ppapi-plugin-launcher', 83 '--ppapi-plugin-launcher',
84 '--utility-cmd-prefix', 84 '--utility-cmd-prefix',
85 } 85 }
86 86
87 chrome_command = [ 87 chrome_command = [
88 chrome_path, 88 chrome_path,
89 '--ipc-fuzzer-testcase=' + args.testcase, 89 '--ipc-fuzzer-testcase=' + args.testcase,
90 '--no-sandbox', 90 '--no-sandbox',
91 '--disable-kill-after-bad-ipc', 91 '--disable-kill-after-bad-ipc',
92 '--disable-mojo-channel',
92 ] 93 ]
93 94
94 if args.gdb_browser: 95 if args.gdb_browser:
95 chrome_command = ['gdb', '--args'] + chrome_command 96 chrome_command = ['gdb', '--args'] + chrome_command
96 97
97 launchers = {} 98 launchers = {}
98 for prefix in prefixes: 99 for prefix in prefixes:
99 launchers[prefix] = fuzzer_path 100 launchers[prefix] = fuzzer_path
100 101
101 for arg in args.chrome_args: 102 for arg in args.chrome_args:
102 if arg.find('=') != -1: 103 if arg.find('=') != -1:
103 switch, value = arg.split('=', 1) 104 switch, value = arg.split('=', 1)
104 if switch in prefixes: 105 if switch in prefixes:
105 launchers[switch] = value + ' ' + launchers[switch] 106 launchers[switch] = value + ' ' + launchers[switch]
106 continue 107 continue
107 chrome_command.append(arg) 108 chrome_command.append(arg)
108 109
109 for switch, value in launchers.items(): 110 for switch, value in launchers.items():
110 chrome_command.append(switch + '=' + value) 111 chrome_command.append(switch + '=' + value)
111 112
112 command_line = ' '.join(['\'' + arg + '\'' for arg in chrome_command]) 113 command_line = ' '.join(['\'' + arg + '\'' for arg in chrome_command])
113 print 'Executing: ' + command_line 114 print 'Executing: ' + command_line
114 115
115 return subprocess.call(chrome_command) 116 return subprocess.call(chrome_command)
116 117
117 118
118 if __name__ == "__main__": 119 if __name__ == "__main__":
119 sys.exit(main()) 120 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | tools/ipc_fuzzer/replay/replay_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698