##// END OF EJS Templates
tests: introduce check-perf-code.py to add extra checks on perf.py...
FUJIWARA Katsunori -
r29570:cbd24018 default
parent child Browse files
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())
@@ -148,3 +148,8 b' perfstatus'
148 $ hg perfwalk
148 $ hg perfwalk
149 $ hg perfparents
149 $ hg perfparents
150
150
151 Check perf.py for historical portability
152
153 $ cd "$TESTDIR/.."
154
155 $ "$TESTDIR"/check-perf-code.py contrib/perf.py
General Comments 0
You need to be logged in to leave comments. Login now