~cprov/uci-engine/transient-check

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python
# Ubuntu CI Engine
# Copyright 2014 Canonical Ltd.

# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License version 3, as
# published by the Free Software Foundation.

# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranties of
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
# PURPOSE.  See the GNU Affero General Public License for more details.

# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

import os
import subprocess
import sys

# get ci_utils on the path
HERE = os.path.abspath(os.path.dirname(__file__))
sys.path.append(os.path.join(HERE, '..', 'ci-utils'))
from ci_utils.setup_helper import setup


if sys.argv[1] == 'test':
    # setuptools doesn't work with django's test harness very well, so
    # we'll just run everything by hand from here
    args = ['./manage.py', 'test']
    if len(sys.argv) > 2:
        args += sys.argv[2:]
    else:
        from webui import settings
        # Default to local apps
        args.extend(settings.LOCAL_APPS)
    sys.exit(subprocess.call(args, cwd=HERE))

requires = [
    'Django==1.5.5',
    'amqplib==1.0.0',
    'mock==1.0.1',
]

setup('webui', 'webui.local_tests', requires)