Flutter Engine
The Flutter Engine
interpolate_test_suite.py
Go to the documentation of this file.
1#!/usr/bin/env python3
2#
3# Copyright 2013 The Flutter Authors. All rights reserved.
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
7""" Interpolates test suite information into a cml file.
8"""
9
10from argparse import ArgumentParser
11import sys
12
13
14def main():
15 # Parse arguments.
16 parser = ArgumentParser()
17 parser.add_argument('--input', action='store', required=True)
18 parser.add_argument('--test-suite', action='store', required=True)
19 parser.add_argument('--output', action='store', required=True)
20 args = parser.parse_args()
21
22 # Read, interpolate, write.
23 with open(args.input, 'r') as i, open(args.output, 'w') as o:
24 o.write(i.read().replace('{{TEST_SUITE}}', args.test_suite))
25
26 return 0
27
28
29if __name__ == '__main__':
30 sys.exit(main())
Definition: main.py:1