OLD | NEW |
(Empty) | |
| 1 # Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 """Generates the data file directory to run validation tests. |
| 5 |
| 6 This script finds all of the files in the resources/data/validaiton folder |
| 7 and generates a file listing all of those files. That file is then consumed |
| 8 by the validation test so that it can locate and fetch all data files. |
| 9 """ |
| 10 |
| 11 from optparse import OptionParser |
| 12 from os import listdir |
| 13 import sys |
| 14 |
| 15 def main(): |
| 16 parser = OptionParser() |
| 17 (_, args) = parser.parse_args() |
| 18 files = [ f for f in listdir(args[0]) ] |
| 19 out = file(args[1], 'w') |
| 20 with out: |
| 21 for f in files: |
| 22 out.write(f + '\n') |
| 23 |
| 24 if __name__ == '__main__': |
| 25 sys.exit(main()) |
OLD | NEW |