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

Side by Side Diff: test/mac/gyptest-bundle-resources.py

Issue 1454433002: Python 3 compatibility Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Rebase with master (4ec6c4e3a94bd04a6da2858163d40b2429b8aad1) Created 4 years, 8 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2013 Google Inc. All rights reserved. 3 # Copyright (c) 2013 Google Inc. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """ 7 """
8 Verifies things related to bundle resources. 8 Verifies things related to bundle resources.
9 """ 9 """
10 10
11 from __future__ import print_function
12
11 import TestGyp 13 import TestGyp
12 14
13 import os 15 import os
14 import stat 16 import stat
15 import sys 17 import sys
16 18
17 if sys.platform in ('darwin'): 19 if sys.platform in ('darwin'):
18 print "This test is currently disabled: https://crbug.com/483696." 20 print("This test is currently disabled: https://crbug.com/483696.")
19 sys.exit(0) 21 sys.exit(0)
20 22
21 23
22 def check_attribs(path, expected_exec_bit): 24 def check_attribs(path, expected_exec_bit):
23 out_path = test.built_file_path( 25 out_path = test.built_file_path(
24 os.path.join('resource.app/Contents/Resources', path), chdir=CHDIR) 26 os.path.join('resource.app/Contents/Resources', path), chdir=CHDIR)
25 27
26 in_stat = os.stat(os.path.join(CHDIR, path)) 28 in_stat = os.stat(os.path.join(CHDIR, path))
27 out_stat = os.stat(out_path) 29 out_stat = os.stat(out_path)
28 if in_stat.st_mtime == out_stat.st_mtime: 30 if in_stat.st_mtime == out_stat.st_mtime:
(...skipping 24 matching lines...) Expand all
53 55
54 check_attribs('executable-file.sh', expected_exec_bit=stat.S_IXUSR) 56 check_attribs('executable-file.sh', expected_exec_bit=stat.S_IXUSR)
55 check_attribs('secret.txt', expected_exec_bit=0) 57 check_attribs('secret.txt', expected_exec_bit=0)
56 58
57 # TODO(thakis): This currently fails with make. 59 # TODO(thakis): This currently fails with make.
58 if test.format != 'make': 60 if test.format != 'make':
59 test.built_file_must_match( 61 test.built_file_must_match(
60 'resource_rule.app/Contents/Resources/secret.txt', 'ABC\n', chdir=CHDIR) 62 'resource_rule.app/Contents/Resources/secret.txt', 'ABC\n', chdir=CHDIR)
61 63
62 test.pass_test() 64 test.pass_test()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698