1#!/usr/bin/env vpython3 2# Copyright 2015 The Chromium Authors 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6import json 7import os 8import sys 9 10import common 11 12 13def main_run(args): 14 with common.temporary_file() as tempfile_path: 15 rc = common.run_command([ 16 sys.executable, 17 os.path.join(common.SRC_DIR, 'third_party', 'blink', 'tools', 18 'lint_test_expectations.py'), '--json', tempfile_path 19 ]) 20 21 with open(tempfile_path) as f: 22 failures = json.load(f) 23 24 common.record_local_script_results('blink_lint_expectations', args.output, 25 failures, True) 26 27 return rc 28 29 30def main_compile_targets(args): 31 json.dump([], args.output) 32 33 34if __name__ == '__main__': 35 funcs = { 36 'run': main_run, 37 'compile_targets': main_compile_targets, 38 } 39 sys.exit(common.run_script(sys.argv[1:], funcs)) 40