OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 # | 3 # |
4 # Use of this source code is governed by a BSD-style license | 4 # Use of this source code is governed by a BSD-style license |
5 # that can be found in the LICENSE file in the root of the source | 5 # that can be found in the LICENSE file in the root of the source |
6 # tree. An additional intellectual property rights grant can be found | 6 # tree. An additional intellectual property rights grant can be found |
7 # in the file PATENTS. All contributing project authors may | 7 # in the file PATENTS. All contributing project authors may |
8 # be found in the AUTHORS file in the root of the source tree. | 8 # be found in the AUTHORS file in the root of the source tree. |
9 | 9 |
10 """Runs various WebRTC tests through valgrind_test.py. | 10 """Runs various WebRTC tests through valgrind_test.py. |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 help=('Store memory tool logs in the <tool>.logs directory ' | 116 help=('Store memory tool logs in the <tool>.logs directory ' |
117 'instead of /tmp.\nThis can be useful for tool ' | 117 'instead of /tmp.\nThis can be useful for tool ' |
118 'developers/maintainers.\nPlease note that the <tool>' | 118 'developers/maintainers.\nPlease note that the <tool>' |
119 '.logs directory will be clobbered on tool startup.')) | 119 '.logs directory will be clobbered on tool startup.')) |
120 parser.add_option("--test-launcher-bot-mode", action="store_true", | 120 parser.add_option("--test-launcher-bot-mode", action="store_true", |
121 help="run the tests with --test-launcher-bot-mode") | 121 help="run the tests with --test-launcher-bot-mode") |
122 parser.add_option("--test-launcher-total-shards", type=int, | 122 parser.add_option("--test-launcher-total-shards", type=int, |
123 help="run the tests with --test-launcher-total-shards") | 123 help="run the tests with --test-launcher-total-shards") |
124 parser.add_option("--test-launcher-shard-index", type=int, | 124 parser.add_option("--test-launcher-shard-index", type=int, |
125 help="run the tests with --test-launcher-shard-index") | 125 help="run the tests with --test-launcher-shard-index") |
| 126 parser.add_option("--drmemory_ops", |
| 127 help="extra options passed to Dr. Memory") |
126 options, args = parser.parse_args() | 128 options, args = parser.parse_args() |
127 | 129 |
128 if options.verbose: | 130 if options.verbose: |
129 logging_utils.config_root(logging.DEBUG) | 131 logging_utils.config_root(logging.DEBUG) |
130 else: | 132 else: |
131 logging_utils.config_root() | 133 logging_utils.config_root() |
132 | 134 |
133 if not options.test: | 135 if not options.test: |
134 parser.error('--test not specified') | 136 parser.error('--test not specified') |
135 | 137 |
136 # Support build dir both with and without the target. | 138 # Support build dir both with and without the target. |
137 if (options.target and options.build_dir and | 139 if (options.target and options.build_dir and |
138 not options.build_dir.endswith(options.target)): | 140 not options.build_dir.endswith(options.target)): |
139 options.build_dir = os.path.join(options.build_dir, options.target) | 141 options.build_dir = os.path.join(options.build_dir, options.target) |
140 | 142 |
141 # If --build_dir is provided, prepend it to the test executable if needed. | 143 # If --build_dir is provided, prepend it to the test executable if needed. |
142 test_executable = options.test | 144 test_executable = options.test |
143 if options.build_dir and not test_executable.startswith(options.build_dir): | 145 if options.build_dir and not test_executable.startswith(options.build_dir): |
144 test_executable = os.path.join(options.build_dir, test_executable) | 146 test_executable = os.path.join(options.build_dir, test_executable) |
145 args = [test_executable] + args | 147 args = [test_executable] + args |
146 | 148 |
147 test = WebRTCTest(options.test, options, args, 'cmdline') | 149 test = WebRTCTest(options.test, options, args, 'cmdline') |
148 return test.Run() | 150 return test.Run() |
149 | 151 |
150 if __name__ == '__main__': | 152 if __name__ == '__main__': |
151 return_code = main(sys.argv) | 153 return_code = main(sys.argv) |
152 sys.exit(return_code) | 154 sys.exit(return_code) |
OLD | NEW |