Tighten DCHECK to clarify that users of syncable storage can't request more quota.
[chromium-blink-merge.git] / testing / scripts / webkit_python_tests.py
blobb0c2fbc1c7296da71cc862e88c610bc572d96e6e
1 #!/usr/bin/env python
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.
6 import json
7 import os
8 import sys
11 import common
14 def main_run(args):
15 with common.temporary_file() as tempfile_path:
16 rc = common.run_command([
17 sys.executable,
18 os.path.join(common.SRC_DIR, 'third_party', 'WebKit',
19 'Tools', 'Scripts', 'test-webkitpy'),
20 '--write-full-results-to', tempfile_path,
23 with open(tempfile_path) as f:
24 results = json.load(f)
26 parsed_results = common.parse_common_test_results(results)
27 failures = parsed_results['unexpected_failures']
29 json.dump({
30 'valid': bool(rc <= common.MAX_FAILURES_EXIT_STATUS and
31 ((rc == 0) or failures)),
32 'failures': failures.keys(),
33 }, args.output)
35 return rc
38 def main_compile_targets(args):
39 json.dump([], args.output)
42 if __name__ == '__main__':
43 funcs = {
44 'run': main_run,
45 'compile_targets': main_compile_targets,
47 sys.exit(common.run_script(sys.argv[1:], funcs))