• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2013 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
5import os
6
7from tracing_build import check_common
8
9GYPI_FILE = os.path.abspath(os.path.join(os.path.dirname(__file__),
10                                         '..', 'trace_viewer.gypi'))
11
12
13def GypiCheck():
14  f = open(GYPI_FILE, 'r')
15  gyp = f.read()
16  f.close()
17
18  data = eval(gyp)  # pylint: disable=eval-used
19  listed_files = []
20  error = ''
21  for group in check_common.FILE_GROUPS:
22    filenames = map(os.path.normpath, data['variables'][group])
23    error += check_common.CheckListedFilesSorted(GYPI_FILE, group, filenames)
24    listed_files.extend(filenames)
25
26  return error + check_common.CheckCommon(GYPI_FILE, listed_files)
27
28
29if __name__ == '__main__':
30  print GypiCheck()
31