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

Side by Side Diff: mojo/public/interfaces/bindings/tests/gen_data_files_list.py

Issue 2745293005: Moving mojo/validation test into LayoutTests (Closed)
Patch Set: fetch from new location Created 3 years, 9 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
OLDNEW
(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()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698