Travis
Jonas Haag
7 years ago
|
0 |
language: python
|
|
1 |
python:
|
|
2 |
- "2.6"
|
|
3 |
- "2.7"
|
|
4 |
install:
|
|
5 |
- "pip install ."
|
|
6 |
- "pip install requests"
|
|
7 |
script:
|
|
8 |
- git config --global user.email "you@example.com"
|
|
9 |
- git config --global user.name "Your Name"
|
|
10 |
- ./runtests.sh
|
0 | 0 |
import os
|
|
1 |
import time
|
1 | 2 |
import contextlib
|
2 | 3 |
import subprocess
|
3 | 4 |
import tempfile
|
|
33 | 34 |
app = klaus.make_app([TEST_REPO], TEST_SITE_NAME, *args, **kwargs)
|
34 | 35 |
server = werkzeug.serving.make_server("localhost", 9876, app)
|
35 | 36 |
thread = threading.Thread(target=server.serve_forever)
|
36 | |
thread.daemon = True
|
37 | 37 |
thread.start()
|
38 | 38 |
try:
|
39 | 39 |
yield
|
40 | 40 |
finally:
|
41 | 41 |
server.server_close()
|
|
42 |
if 'TRAVIS' in os.environ:
|
|
43 |
# This fixes some "Address already in use" cases on Travis.
|
|
44 |
time.sleep(0.3)
|
42 | 45 |
|
43 | 46 |
|
44 | 47 |
def testserver_require_auth(*args, **kwargs):
|