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

Side by Side Diff: tools/clang/translation_unit/test_translation_unit.py

Issue 1592403002: update obsolete code.google.com documentation links (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 4 years, 10 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
« no previous file with comments | « tools/clang/scripts/update.py ('k') | tools/gn/misc/emacs/gn-mode.el » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2014 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Test for TranslationUnitGenerator tool.""" 6 """Test for TranslationUnitGenerator tool."""
7 7
8 import difflib 8 import difflib
9 import glob 9 import glob
10 import json 10 import json
(...skipping 10 matching lines...) Expand all
21 return fh.read().replace('$test_files_dir', test_files_dir) 21 return fh.read().replace('$test_files_dir', test_files_dir)
22 22
23 23
24 def _NumberOfTestsToString(tests): 24 def _NumberOfTestsToString(tests):
25 """Returns an English sentence describing the number of tests.""" 25 """Returns an English sentence describing the number of tests."""
26 return "%d test%s" % (tests, 's' if tests != 1 else '') 26 return "%d test%s" % (tests, 's' if tests != 1 else '')
27 27
28 28
29 # Before running this test script, please build the translation_unit clang tool 29 # Before running this test script, please build the translation_unit clang tool
30 # first. This is explained here: 30 # first. This is explained here:
31 # https://code.google.com/p/chromium/wiki/ClangToolRefactoring 31 # https://chromium.googlesource.com/chromium/src/+/master/docs/clang_tool_refact oring.md
32 def main(): 32 def main():
33 tools_clang_directory = os.path.dirname(os.path.dirname( 33 tools_clang_directory = os.path.dirname(os.path.dirname(
34 os.path.realpath(__file__))) 34 os.path.realpath(__file__)))
35 tools_clang_scripts_directory = os.path.join(tools_clang_directory, 'scripts') 35 tools_clang_scripts_directory = os.path.join(tools_clang_directory, 'scripts')
36 test_directory_for_tool = os.path.join( 36 test_directory_for_tool = os.path.join(
37 tools_clang_directory, 'translation_unit', 'test_files') 37 tools_clang_directory, 'translation_unit', 'test_files')
38 compile_database = os.path.join(test_directory_for_tool, 38 compile_database = os.path.join(test_directory_for_tool,
39 'compile_commands.json') 39 'compile_commands.json')
40 compile_database_template = compile_database + '.template' 40 compile_database_template = compile_database + '.template'
41 source_files = glob.glob(os.path.join(test_directory_for_tool, '*.cc')) 41 source_files = glob.glob(os.path.join(test_directory_for_tool, '*.cc'))
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 print '[==========] %s ran.' % _NumberOfTestsToString(len(source_files)) 97 print '[==========] %s ran.' % _NumberOfTestsToString(len(source_files))
98 if passed > 0: 98 if passed > 0:
99 print '[ PASSED ] %s.' % _NumberOfTestsToString(passed) 99 print '[ PASSED ] %s.' % _NumberOfTestsToString(passed)
100 if failed > 0: 100 if failed > 0:
101 print '[ FAILED ] %s.' % _NumberOfTestsToString(failed) 101 print '[ FAILED ] %s.' % _NumberOfTestsToString(failed)
102 102
103 103
104 if __name__ == '__main__': 104 if __name__ == '__main__':
105 sys.exit(main()) 105 sys.exit(main())
OLDNEW
« no previous file with comments | « tools/clang/scripts/update.py ('k') | tools/gn/misc/emacs/gn-mode.el » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698