OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/python2 |
| 2 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. |
| 5 |
| 6 # Script that prints out "option=value" from the config file. Used for testing. |
| 7 |
| 8 import ConfigParser |
| 9 import os |
| 10 import sys |
| 11 |
| 12 OPTIONS_SECTION_LIBFUZZER = 'libfuzzer' |
| 13 |
| 14 config_path = os.path.join(os.path.dirname(sys.argv[0]), sys.argv[1]) |
| 15 fuzzer_config = ConfigParser.ConfigParser() |
| 16 fuzzer_config.read(config_path) |
| 17 |
| 18 if not fuzzer_config.has_section(OPTIONS_SECTION_LIBFUZZER): |
| 19 sys.exit(-1) |
| 20 |
| 21 for option_name, option_value in fuzzer_config.items(OPTIONS_SECTION_LIBFUZZER): |
| 22 sys.stdout.write('%s=%s\n' % (option_name, option_value)) |
OLD | NEW |