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

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

Issue 1025483002: Restructure the ipc_fuzzer directory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move more files around Created 5 years, 9 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
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 help='any additional arguments are passed to chrome') 52 help='any additional arguments are passed to chrome')
53 args = parser.parse_args() 53 args = parser.parse_args()
54 54
55 platform = GetPlatform() 55 platform = GetPlatform()
56 chrome_binary = CHROME_BINARY_FOR_PLATFORM_DICT[platform] 56 chrome_binary = CHROME_BINARY_FOR_PLATFORM_DICT[platform]
57 fuzzer_binary = 'ipc_fuzzer_replay' 57 fuzzer_binary = 'ipc_fuzzer_replay'
58 if platform == 'WINDOWS': 58 if platform == 'WINDOWS':
59 fuzzer_binary += '.exe' 59 fuzzer_binary += '.exe'
60 60
61 script_path = os.path.realpath(__file__) 61 script_path = os.path.realpath(__file__)
62 ipc_fuzzer_dir = os.path.dirname(script_path) 62 ipc_fuzzer_dir = os.path.join(os.path.dirname(script_path), os.pardir)
63 src_dir = os.path.abspath(os.path.join(ipc_fuzzer_dir, os.pardir, os.pardir)) 63 src_dir = os.path.abspath(os.path.join(ipc_fuzzer_dir, os.pardir, os.pardir))
64 out_dir = os.path.join(src_dir, args.out_dir) 64 out_dir = os.path.join(src_dir, args.out_dir)
65 build_dir = os.path.join(out_dir, args.build_type) 65 build_dir = os.path.join(out_dir, args.build_type)
66 66
67 chrome_path = os.path.join(build_dir, chrome_binary) 67 chrome_path = os.path.join(build_dir, chrome_binary)
68 if not os.path.exists(chrome_path): 68 if not os.path.exists(chrome_path):
69 print 'chrome executable not found at ', chrome_path 69 print 'chrome executable not found at ', chrome_path
70 return 1 70 return 1
71 71
72 fuzzer_path = os.path.join(build_dir, fuzzer_binary) 72 fuzzer_path = os.path.join(build_dir, fuzzer_binary)
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 chrome_command.append(switch + '=' + value) 111 chrome_command.append(switch + '=' + value)
112 112
113 command_line = ' '.join(['\'' + arg + '\'' for arg in chrome_command]) 113 command_line = ' '.join(['\'' + arg + '\'' for arg in chrome_command])
114 print 'Executing: ' + command_line 114 print 'Executing: ' + command_line
115 115
116 return subprocess.call(chrome_command) 116 return subprocess.call(chrome_command)
117 117
118 118
119 if __name__ == "__main__": 119 if __name__ == "__main__":
120 sys.exit(main()) 120 sys.exit(main())
OLDNEW
« no previous file with comments | « tools/ipc_fuzzer/scripts/ipc_fuzzer_mut.py ('k') | tools/ipc_fuzzer/scripts/remove_close_messages.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698