OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Sets environment variables needed to run a chromium unit test.""" | 6 """Sets environment variables needed to run a chromium unit test.""" |
7 | 7 |
8 import os | 8 import os |
9 import subprocess | 9 import subprocess |
10 import sys | 10 import sys |
(...skipping 30 matching lines...) Expand all Loading... |
41 return subprocess.call(cmd, env=env) | 41 return subprocess.call(cmd, env=env) |
42 except OSError: | 42 except OSError: |
43 print >> sys.stderr, 'Failed to start %s' % cmd | 43 print >> sys.stderr, 'Failed to start %s' % cmd |
44 raise | 44 raise |
45 | 45 |
46 | 46 |
47 def main(): | 47 def main(): |
48 return run_executable(sys.argv[1:], os.environ.copy()) | 48 return run_executable(sys.argv[1:], os.environ.copy()) |
49 | 49 |
50 | 50 |
51 if __name__ == "__main__": | 51 if __name__ == '__main__': |
52 sys.exit(main()) | 52 sys.exit(main()) |
OLD | NEW |