~doanac/uci-engine/runner-refactor

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
#!/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/>.
"""The CI Engine test runner."""
import os
import sys

from testing import venv
# Ensure this program runs within a virtualenv, if one hasn't been provided.
venv.install()

HERE = os.path.abspath(os.path.dirname(__file__))

# We want to be able to import from the branch root
sys.path.append(HERE)
from testing import run_tests


if __name__ == '__main__':
    retval = run_tests.main(sys.argv[1:], sys.stdout, sys.stderr)
    venv.delete()
    sys.exit(retval)