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

Side by Side Diff: chrome/test/pyautolib/policy_posix_util.py

Issue 222873002: Remove pyauto tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/pyautolib/policy_base.py ('k') | chrome/test/pyautolib/prefs_info.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
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
4 # found in the LICENSE file.
5
6 """Helper script to copy policy files into the correct location the machine."""
7
8 import os
9 import shutil
10 import sys
11
12
13 def main():
14 assert os.geteuid() == 0, 'Need superuser privileges'
15 if sys.argv[1] == 'copy':
16 assert os.path.isdir(sys.argv[3])
17 shutil.copy(sys.argv[2], sys.argv[3])
18 dirList = os.listdir(sys.argv[3])
19 for fname in dirList:
20 filename = os.path.join(sys.argv[3], fname)
21 os.chmod(filename, 0755)
22 elif sys.argv[1] == 'setup_dir':
23 os.makedirs(sys.argv[2])
24 elif sys.argv[1] == 'perm_dir':
25 os.system('chmod -R 755 "%s/../.."' % sys.argv[2])
26 elif sys.argv[1] == 'remove_dir':
27 os.system('rm -rf "%s"' % sys.argv[2])
28 else:
29 print >>sys.stderr, (
30 'Invalid syntax. Possible values are [copy], [setup_dir], '
31 '[perm_dir], [remove_dir]')
32 return 1
33 return 0
34
35
36 if __name__ == '__main__':
37 sys.exit(main())
OLDNEW
« no previous file with comments | « chrome/test/pyautolib/policy_base.py ('k') | chrome/test/pyautolib/prefs_info.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698