OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2012 the V8 project authors. All rights reserved. | 3 # Copyright 2012 the V8 project authors. All rights reserved. |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 latest_timestamp = -1 | 436 latest_timestamp = -1 |
437 latest_config = None | 437 latest_config = None |
438 for gn_config in os.listdir(gn_out_dir): | 438 for gn_config in os.listdir(gn_out_dir): |
439 gn_config_dir = os.path.join(gn_out_dir, gn_config) | 439 gn_config_dir = os.path.join(gn_out_dir, gn_config) |
440 if not isdir(gn_config_dir): | 440 if not isdir(gn_config_dir): |
441 continue | 441 continue |
442 if os.path.getmtime(gn_config_dir) > latest_timestamp: | 442 if os.path.getmtime(gn_config_dir) > latest_timestamp: |
443 latest_timestamp = os.path.getmtime(gn_config_dir) | 443 latest_timestamp = os.path.getmtime(gn_config_dir) |
444 latest_config = gn_config | 444 latest_config = gn_config |
445 if latest_config: | 445 if latest_config: |
| 446 print(">>> Latest GN build found is %s" % latest_config) |
446 options.outdir = os.path.join(DEFAULT_OUT_GN, latest_config) | 447 options.outdir = os.path.join(DEFAULT_OUT_GN, latest_config) |
447 | 448 |
448 build_config_path = os.path.join( | 449 build_config_path = os.path.join( |
449 BASE_DIR, options.outdir, "v8_build_config.json") | 450 BASE_DIR, options.outdir, "v8_build_config.json") |
450 if os.path.exists(build_config_path): | 451 if os.path.exists(build_config_path): |
451 try: | 452 try: |
452 with open(build_config_path) as f: | 453 with open(build_config_path) as f: |
453 build_config = json.load(f) | 454 build_config = json.load(f) |
454 except Exception: | 455 except Exception: |
455 print ("%s exists but contains invalid json. Is your build up-to-date?" % | 456 print ("%s exists but contains invalid json. Is your build up-to-date?" % |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 "--coverage-dir=%s" % options.sancov_dir]) | 898 "--coverage-dir=%s" % options.sancov_dir]) |
898 except: | 899 except: |
899 print >> sys.stderr, "Error: Merging sancov files failed." | 900 print >> sys.stderr, "Error: Merging sancov files failed." |
900 exit_code = 1 | 901 exit_code = 1 |
901 | 902 |
902 return exit_code | 903 return exit_code |
903 | 904 |
904 | 905 |
905 if __name__ == "__main__": | 906 if __name__ == "__main__": |
906 sys.exit(Main()) | 907 sys.exit(Main()) |
OLD | NEW |