| OLD | NEW |
| (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 'child: verify the test data files were mapped properly' |
| 12 files = os.listdir('files1') |
| 13 tree = { |
| 14 'test_file1.txt': 'Foo\n', |
| 15 'test_file2.txt': 'Bar\n', |
| 16 } |
| 17 if files != tree.keys(): |
| 18 print '%s != %s' % (files, tree.keys()) |
| 19 return 2 |
| 20 for k, v in tree.iteritems(): |
| 21 content = open(os.path.join('files1', k), 'rb').read() |
| 22 if v != content: |
| 23 print '%s: %r != %r' % (k, v, content) |
| 24 return 3 |
| 25 |
| 26 if sys.argv[1] == '--ok': |
| 27 return 0 |
| 28 elif sys.argv[1] == '--fail': |
| 29 return 1 |
| 30 return 4 |
| 31 |
| 32 |
| 33 if __name__ == '__main__': |
| 34 sys.exit(main()) |
| OLD | NEW |