skia2/gn/make_gm_gni.py
Hal Canary 7c70143055 GMs: re-sort gni, script to regenerate gni, file name convention
Change-Id: I4b61c2a66f8d6b2d8c4a5ffd8c373b643415c70c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211598
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-05-02 20:08:37 +00:00

22 lines
652 B
Python
Executable File

#! /usr/bin/env python
# Copyright 2019 Google LLC.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import glob
os.chdir(os.path.dirname(__file__))
with open('gm.gni', 'w') as o:
o.write('''# Copyright 2016 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Things are easiest for everyone if these source paths are absolute.
_gm = get_path_info("../gm", "abspath")
gm_sources = [
''')
for path in sorted(glob.glob('../gm/*.c*')):
o.write(' "%s",\n' % path.replace('../gm', '$_gm'))
o.write(']\n')