Show More
@@ -0,0 +1,30 b'' | |||||
|
1 | #!/usr/bin/env python | |||
|
2 | # | |||
|
3 | # check-perf-code - (historical) portability checker for contrib/perf.py | |||
|
4 | ||||
|
5 | from __future__ import absolute_import | |||
|
6 | ||||
|
7 | import os | |||
|
8 | import sys | |||
|
9 | ||||
|
10 | # write static check patterns here | |||
|
11 | perfpypats = [ | |||
|
12 | [ | |||
|
13 | ], | |||
|
14 | # warnings | |||
|
15 | [ | |||
|
16 | ] | |||
|
17 | ] | |||
|
18 | ||||
|
19 | if __name__ == "__main__": | |||
|
20 | # import contrib/check-code.py as checkcode | |||
|
21 | assert 'RUNTESTDIR' in os.environ, "use check-perf-code.py in *.t script" | |||
|
22 | contribpath = os.path.join(os.environ['RUNTESTDIR'], '..', 'contrib') | |||
|
23 | sys.path.insert(0, contribpath) | |||
|
24 | checkcode = __import__('check-code') | |||
|
25 | ||||
|
26 | # register perf.py specific entry with "checks" in check-code.py | |||
|
27 | checkcode.checks.append(('perf.py', r'contrib/perf.py$', '', | |||
|
28 | checkcode.pyfilters, perfpypats)) | |||
|
29 | ||||
|
30 | sys.exit(checkcode.main()) |
General Comments 0
You need to be logged in to leave comments.
Login now