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

Side by Side Diff: tests/run_isolated/check_files.py

Issue 19917006: Move all googletest related scripts into googletest/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/swarm_client
Patch Set: Remove unnecessary pylint warning disable Created 7 years, 5 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 | « tests/run_isolated/check_files.isolated ('k') | tests/run_isolated/gtest_fake.isolated » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 """Checks all the expected files are mapped.""" 6 """Checks all the expected files are mapped."""
7 7
8 import os 8 import os
9 import sys 9 import sys
10 10
11 ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) 11 ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
12 12
13 13
14 def main(): 14 def main():
15 expected = sorted([ 15 expected = sorted([
16 'check_files.py', 16 'check_files.py',
17 'gtest_fake.py',
18 'file1.txt', 17 'file1.txt',
18 'file1_copy.txt',
19 'file2.txt', 19 'file2.txt',
20 'repeated_files.py',
20 ]) 21 ])
21 actual = sorted(os.listdir(ROOT_DIR)) 22 actual = sorted(os.listdir(ROOT_DIR))
22 if expected != actual: 23 if expected != actual:
23 print >> sys.stderr, 'Expected list doesn\'t match:' 24 print >> sys.stderr, 'Expected list doesn\'t match:'
24 print >> sys.stderr, ', '.join(expected) 25 print >> sys.stderr, ', '.join(expected)
25 print >> sys.stderr, ', '.join(actual) 26 print >> sys.stderr, ', '.join(actual)
26 return 1 27 return 1
27 28
28 # Check that file2.txt is in reality file3.txt. 29 # Check that file2.txt is in reality file3.txt.
29 with open(os.path.join(ROOT_DIR, 'file2.txt'), 'rb') as f: 30 with open(os.path.join(ROOT_DIR, 'file2.txt'), 'rb') as f:
30 if f.read() != 'File3\n': 31 if f.read() != 'File3\n':
31 print >> sys.stderr, 'file2.txt should be file3.txt in reality' 32 print >> sys.stderr, 'file2.txt should be file3.txt in reality'
32 return 2 33 return 2
33 34
34 print 'Success' 35 print 'Success'
35 return 0 36 return 0
36 37
37 38
38 if __name__ == '__main__': 39 if __name__ == '__main__':
39 sys.exit(main()) 40 sys.exit(main())
OLDNEW
« no previous file with comments | « tests/run_isolated/check_files.isolated ('k') | tests/run_isolated/gtest_fake.isolated » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698