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

Side by Side Diff: tools/clang/plugins/tests/test.py

Issue 2298013004: Try to fix clang plugin tests after https://codereview.chromium.org/2270433002/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | 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 2016 The Chromium Authors. All rights reserved. 2 # Copyright 2016 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 import argparse 6 import argparse
7 import os 7 import os
8 import subprocess 8 import subprocess
9 import sys 9 import sys
10 10
11 script_dir = os.path.dirname(os.path.realpath(__file__)) 11 script_dir = os.path.dirname(os.path.realpath(__file__))
12 tool_dir = os.path.abspath(os.path.join(script_dir, '../../pylib')) 12 tool_dir = os.path.abspath(os.path.join(script_dir, '../../pylib'))
13 sys.path.insert(0, tool_dir) 13 sys.path.insert(0, tool_dir)
14 14
15 from clang import plugin_testing 15 from clang import plugin_testing
16 16
17 17
18 class ChromeStylePluginTest(plugin_testing.ClangPluginTest): 18 class ChromeStylePluginTest(plugin_testing.ClangPluginTest):
19 """Test harness for the Chrome style plugin.""" 19 """Test harness for the Chrome style plugin."""
20 20
21 def AdjustClangArguments(self, clang_cmd): 21 def AdjustClangArguments(self, clang_cmd):
22 self.AddPluginArg(clang_cmd, 'follow-macro-expansion')
23 clang_cmd.extend([ 22 clang_cmd.extend([
24 # Skip code generation 23 # Skip code generation
25 '-fsyntax-only', 24 '-fsyntax-only',
26 # Fake system directory for tests 25 # Fake system directory for tests
27 '-isystem', os.path.join(os.getcwd(), 'system'), 26 '-isystem', os.path.join(os.getcwd(), 'system'),
28 '-Wno-inconsistent-missing-override', 27 '-Wno-inconsistent-missing-override',
29 ]) 28 ])
30 29
31 30
32 def main(): 31 def main():
(...skipping 11 matching lines...) Expand all
44 return ChromeStylePluginTest( 43 return ChromeStylePluginTest(
45 os.path.dirname(os.path.realpath(__file__)), 44 os.path.dirname(os.path.realpath(__file__)),
46 args.clang_path, 45 args.clang_path,
47 args.plugin_path, 46 args.plugin_path,
48 'find-bad-constructs', 47 'find-bad-constructs',
49 args.reset_results).Run() 48 args.reset_results).Run()
50 49
51 50
52 if __name__ == '__main__': 51 if __name__ == '__main__':
53 sys.exit(main()) 52 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698