add coverage
This commit is contained in:
parent
9cfffa360e
commit
1d0c8b1800
3 changed files with 30 additions and 1 deletions
|
@ -60,4 +60,6 @@ rm -rf htmlcov
|
||||||
rm -rf tmp
|
rm -rf tmp
|
||||||
coverage html --include=shadowsocks/*
|
coverage html --include=shadowsocks/*
|
||||||
|
|
||||||
|
coverage report --include=shadowsocks/* | tail -n1 | rev | cut -d' ' -f 1 | rev > /tmp/shadowsocks-coverage
|
||||||
|
|
||||||
exit $result
|
exit $result
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
shadowsocks
|
shadowsocks
|
||||||
===========
|
===========
|
||||||
|
|
||||||
[![PyPI version]][PyPI] [![Build Status]][Travis CI]
|
[![PyPI version]][PyPI]
|
||||||
|
[![Build Status]][Travis CI]
|
||||||
|
[![Coverage Status]][Coverage]
|
||||||
|
|
||||||
A fast tunnel proxy that helps you bypass firewalls.
|
A fast tunnel proxy that helps you bypass firewalls.
|
||||||
|
|
||||||
|
@ -119,6 +121,8 @@ Bugs and Issues
|
||||||
[Android]: https://github.com/clowwindy/shadowsocks/wiki/Ports-and-Clients#android
|
[Android]: https://github.com/clowwindy/shadowsocks/wiki/Ports-and-Clients#android
|
||||||
[Build Status]: https://img.shields.io/travis/clowwindy/shadowsocks/master.svg?style=flat
|
[Build Status]: https://img.shields.io/travis/clowwindy/shadowsocks/master.svg?style=flat
|
||||||
[Chinese Readme]: https://github.com/clowwindy/shadowsocks/wiki/Shadowsocks-%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E
|
[Chinese Readme]: https://github.com/clowwindy/shadowsocks/wiki/Shadowsocks-%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E
|
||||||
|
[Coverage Status]: http://192.81.132.184/result/shadowsocks
|
||||||
|
[Coverage]: http://192.81.132.184/job/Shadowsocks/ws/htmlcov/index.html
|
||||||
[Debian sid]: https://packages.debian.org/unstable/python/shadowsocks
|
[Debian sid]: https://packages.debian.org/unstable/python/shadowsocks
|
||||||
[the package]: https://pypi.python.org/pypi/shadowsocks
|
[the package]: https://pypi.python.org/pypi/shadowsocks
|
||||||
[Encryption]: https://github.com/clowwindy/shadowsocks/wiki/Encryption
|
[Encryption]: https://github.com/clowwindy/shadowsocks/wiki/Encryption
|
||||||
|
|
23
tests/coverage_server.py
Normal file
23
tests/coverage_server.py
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import tornado.ioloop
|
||||||
|
import tornado.web
|
||||||
|
import urllib
|
||||||
|
|
||||||
|
|
||||||
|
class MainHandler(tornado.web.RequestHandler):
|
||||||
|
def get(self):
|
||||||
|
with open('/tmp/shadowsocks-coverage', 'rb') as f:
|
||||||
|
coverage = f.read().strip()
|
||||||
|
self.redirect(('https://img.shields.io/badge/'
|
||||||
|
'coverage-%s-brightgreen.svg'
|
||||||
|
'?style=flat') %
|
||||||
|
urllib.quote(coverage))
|
||||||
|
|
||||||
|
application = tornado.web.Application([
|
||||||
|
(r"/shadowsocks", MainHandler),
|
||||||
|
])
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
application.listen(8888, address='127.0.0.1')
|
||||||
|
tornado.ioloop.IOLoop.instance().start()
|
Loading…
Reference in a new issue