Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: mojo/tools/mopy_internal/transitive_hash.py

Issue 878933003: Move the apptest runner and parts of mopy to the public SDK. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/tools/mopy_internal/perf_data_uploader.py ('k') | mojo/tools/mopy_internal/version.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 import platform 6 import platform
7 import subprocess 7 import subprocess
8 import sys 8 import sys
9 9
10 # pylint: disable=E0611 10 # pylint: disable=E0611
11 from hashlib import sha256 11 from hashlib import sha256
12 # pylint: enable=E0611 12 # pylint: enable=E0611
13 from os.path import basename, realpath 13 from os.path import basename, realpath
14 14
15 from mopy.file_hash import file_hash 15 from mopy_internal.file_hash import file_hash
16 from mopy.memoize import memoize 16 from mopy_internal.memoize import memoize
17 17
18 _logging = logging.getLogger() 18 _logging = logging.getLogger()
19 19
20 @memoize 20 @memoize
21 def _get_dependencies(filename): 21 def _get_dependencies(filename):
22 """Returns a list of filenames for files that the given file depends on.""" 22 """Returns a list of filenames for files that the given file depends on."""
23 if platform.system() == 'Windows': 23 if platform.system() == 'Windows':
24 # There's no ldd on Windows. We can try to bundle or require depends, but 24 # There's no ldd on Windows. We can try to bundle or require depends, but
25 # given that we're not supporting component build this seems low priority. 25 # given that we're not supporting component build this seems low priority.
26 return [] 26 return []
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 for filename in argv[1:]: 71 for filename in argv[1:]:
72 try: 72 try:
73 print transitive_hash(filename), filename 73 print transitive_hash(filename), filename
74 except subprocess.CalledProcessError: 74 except subprocess.CalledProcessError:
75 print "ERROR", filename 75 print "ERROR", filename
76 rv = 1 76 rv = 1
77 return rv 77 return rv
78 78
79 if __name__ == '__main__': 79 if __name__ == '__main__':
80 sys.exit(main(sys.argv)) 80 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « mojo/tools/mopy_internal/perf_data_uploader.py ('k') | mojo/tools/mopy_internal/version.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698