diff -r 3d52e7c78a6b -r cbd240188e4e tests/check-perf-code.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/check-perf-code.py Fri May 20 09:47:35 2016 +0900 @@ -0,0 +1,30 @@ +#!/usr/bin/env python +# +# check-perf-code - (historical) portability checker for contrib/perf.py + +from __future__ import absolute_import + +import os +import sys + +# write static check patterns here +perfpypats = [ + [ + ], + # warnings + [ + ] +] + +if __name__ == "__main__": + # import contrib/check-code.py as checkcode + assert 'RUNTESTDIR' in os.environ, "use check-perf-code.py in *.t script" + contribpath = os.path.join(os.environ['RUNTESTDIR'], '..', 'contrib') + sys.path.insert(0, contribpath) + checkcode = __import__('check-code') + + # register perf.py specific entry with "checks" in check-code.py + checkcode.checks.append(('perf.py', r'contrib/perf.py$', '', + checkcode.pyfilters, perfpypats)) + + sys.exit(checkcode.main())