1#!/usr/bin/env python
2
3
4import os
5import sys
6
7from nose import config
8from nose import core
9
10sys.path.append(os.getcwd())
11sys.path.append(os.path.dirname(__file__))
12
13
14import ryu.tests.unit
15from ryu.tests.test_lib import run_tests
16
17
18if __name__ == '__main__':
19    exit_status = False
20
21    # if a single test case was specified,
22    # we should only invoked the tests once
23    invoke_once = len(sys.argv) > 1
24
25    cwd = os.getcwd()
26    c = config.Config(stream=sys.stdout,
27                      env=os.environ,
28                      verbosity=int(os.environ.get('NOSE_VERBOSE', 3)),
29                      includeExe=True,
30                      traverseNamespace=True,
31                      plugins=core.DefaultPluginManager())
32    c.configureWhere(ryu.tests.unit.__path__)
33
34    exit_status = run_tests(c)
35    sys.exit(exit_status)
36