Chromium Code Reviews| Index: tools/ipc_fuzzer/mutate/cf_package_builder.py |
| diff --git a/tools/ipc_fuzzer/mutate/cf_package_builder.py b/tools/ipc_fuzzer/mutate/cf_package_builder.py |
| index 806ce66e518086b999e8cd8aee4dbce34f987537..33afcb500a290f907cd2dc1cfd2b52dbf4f060b4 100755 |
| --- a/tools/ipc_fuzzer/mutate/cf_package_builder.py |
| +++ b/tools/ipc_fuzzer/mutate/cf_package_builder.py |
| @@ -15,12 +15,24 @@ import shutil |
| import sys |
| import tempfile |
| +FUZZER_LIST_FOR_PLATFORM_DICT = { |
|
Tom Sepez
2015/01/22 00:13:05
We should probably just have code to add a ".exe"
|
| + 'LINUX': ['ipc_fuzzer_mut', 'ipc_fuzzer_gen'], |
| + 'MAC': ['ipc_fuzzer_mut', 'ipc_fuzzer_gen'], |
| + 'WINDOWS': ['ipc_fuzzer_mut.exe', 'ipc_fuzzer_gen.exe'], |
| +} |
| + |
| +def GetPlatform(): |
| + if sys.platform.startswith('win'): |
| + return 'WINDOWS' |
| + elif sys.platform.startswith('linux'): |
|
Tom Sepez
2015/01/22 00:13:05
nit: elif after return
|
| + return 'LINUX' |
| + elif sys.platform == 'darwin': |
| + return 'MAC' |
| + |
| class CFPackageBuilder: |
| def __init__(self): |
| - self.fuzzer_list = [ |
| - 'ipc_fuzzer_mut', |
| - 'ipc_fuzzer_gen', |
| - ] |
| + self.platform = GetPlatform() |
| + self.fuzzer_list = FUZZER_LIST_FOR_PLATFORM_DICT[self.platform] |
| def parse_args(self): |
| desc = 'Builder of IPC fuzzer packages for ClusterFuzz' |