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

Unified Diff: tools/ipc_fuzzer/play_testcase.py

Issue 861113003: Fix issues with replay_process in ipc fuzzer. Make it compile on windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Log to both stderr, file since stderr is hard to get on windows. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/ipc_fuzzer/mutate/cf_package_builder.py ('k') | tools/ipc_fuzzer/replay/replay_process.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/ipc_fuzzer/play_testcase.py
diff --git a/tools/ipc_fuzzer/play_testcase.py b/tools/ipc_fuzzer/play_testcase.py
index 213eca79ff6fb4df54ad79a59f05b327cbf062f8..4f3b43965e21a91a3706627510675928801e1084 100755
--- a/tools/ipc_fuzzer/play_testcase.py
+++ b/tools/ipc_fuzzer/play_testcase.py
@@ -17,6 +17,24 @@ import platform
import subprocess
import sys
+CHROME_BINARY_FOR_PLATFORM_DICT = {
+ 'LINUX': 'chrome',
+ 'MAC': 'Chromium.app/Contents/MacOS/Chromium',
+ 'WINDOWS': 'chrome.exe',
+}
+
+def GetPlatform():
+ platform = None
+ if sys.platform.startswith('win'):
+ platform = 'WINDOWS'
+ elif sys.platform.startswith('linux'):
+ platform = 'LINUX'
+ elif sys.platform == 'darwin':
+ platform = 'MAC'
+
+ assert platform is not None
+ return platform
+
def main():
desc = 'Wrapper to run chrome with child processes replaced by IPC fuzzers'
parser = argparse.ArgumentParser(description=desc)
@@ -34,8 +52,11 @@ def main():
help='any additional arguments are passed to chrome')
args = parser.parse_args()
- chrome_binary = 'chrome'
+ platform = GetPlatform()
+ chrome_binary = CHROME_BINARY_FOR_PLATFORM_DICT[platform]
fuzzer_binary = 'ipc_fuzzer_replay'
+ if platform == 'WINDOWS':
+ fuzzer_binary += '.exe'
script_path = os.path.realpath(__file__)
ipc_fuzzer_dir = os.path.dirname(script_path)
« no previous file with comments | « tools/ipc_fuzzer/mutate/cf_package_builder.py ('k') | tools/ipc_fuzzer/replay/replay_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698