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 os import listdir |
| 12 import sys |
| 13 |
| 14 def gen_files(): |
| 15 files = listdir(sys.argv[1]) |
| 16 out = file(sys.argv[2], 'w') |
| 17 files = [ f[:-5] for f in files if f.endswith('.data') ] |
| 18 with out: |
| 19 for f in files: |
| 20 out.write(f + '\n') |
| 21 |
| 22 gen_files() |
OLD | NEW |