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("../../mojo/public/interfaces/bindings/tests/data/validation") | |
alokp
2017/03/21 22:45:01
can we pass the input directory as argument?
| |
16 out = file(sys.argv[1], 'w') | |
17 files = [ f[:-5] for f in files if f[-5:] == '.data' ] | |
alokp
2017/03/21 22:45:01
use endswith('.data')?
| |
18 with out: | |
19 for f in files: | |
20 out.write(f + '\n') | |
21 | |
22 gen_files() | |
OLD | NEW |