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

Side by Side Diff: swarm_client/tests/isolate/symlink_full.py

Issue 69143004: Delete swarm_client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/
Patch Set: Created 7 years, 1 month 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
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 import os
7 import sys
8
9
10 def main():
11 print 'symlink: touches files2/'
12 assert len(sys.argv) == 1
13
14 expected = {
15 os.path.join('subdir', '42.txt'):
16 'the answer to life the universe and everything\n',
17 'test_file1.txt': 'Foo\n',
18 'test_file2.txt': 'Bar\n',
19 }
20
21 root = 'files2'
22 actual = {}
23 for relroot, dirnames, filenames in os.walk(root):
24 for filename in filenames:
25 fullpath = os.path.join(relroot, filename)
26 actual[fullpath[len(root)+1:]] = open(fullpath, 'rb').read()
27 if '.svn' in dirnames:
28 dirnames.remove('.svn')
29
30 if actual != expected:
31 print 'Failure'
32 print actual
33 print expected
34 return 1
35 return 0
36
37
38 if __name__ == '__main__':
39 sys.exit(main())
OLDNEW
« no previous file with comments | « swarm_client/tests/isolate/symlink_full.isolate ('k') | swarm_client/tests/isolate/symlink_outside_build_root.isolate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698