configurationengine/source/plugins/symbian/ConeCRMLPlugin/CRMLPlugin/tests/__init__.py
equal
deleted
inserted
replaced
11 # |
11 # |
12 # Contributors: |
12 # Contributors: |
13 # |
13 # |
14 # Description: |
14 # Description: |
15 # |
15 # |
|
16 |
16 import sys, os, unittest |
17 import sys, os, unittest |
17 |
18 |
18 # Path to the directory where this file is located |
19 # Path to the directory where this file is located |
19 ROOT_PATH = os.path.dirname(os.path.abspath(__file__)) |
20 ROOT_PATH = os.path.dirname(os.path.abspath(__file__)) |
20 |
21 |
21 # Import common plug-in initialization |
22 from testautomation import plugin_utils |
22 PLUGINS_ROOT = os.path.normpath(os.path.join(ROOT_PATH, '../../../..')) |
|
23 assert os.path.split(PLUGINS_ROOT)[1] == 'plugins' |
|
24 if PLUGINS_ROOT not in sys.path: sys.path.append(PLUGINS_ROOT) |
|
25 import plugin_utils |
|
26 |
|
27 plugin_utils.plugin_test_init(ROOT_PATH) |
23 plugin_utils.plugin_test_init(ROOT_PATH) |
28 |
|
29 SCRIPTS_ROOT = os.path.normpath(os.path.join(ROOT_PATH, '../../../../..', "scripts")) |
|
30 assert os.path.exists(SCRIPTS_ROOT) |
|
31 os.environ['PYTHONPATH'] = os.environ.get('PYTHONPATH', '') + ';' + SCRIPTS_ROOT + ';' + PLUGINS_ROOT |
|
32 |
|
33 def collect_suite(): |
|
34 return plugin_utils.collect_test_suite_from_dir(ROOT_PATH) |
|
35 |
|
36 def runtests(): |
|
37 unittest.TextTestRunner(verbosity=2).run(collect_suite()) |
|
38 |
|
39 if __name__ == '__main__': |
|
40 runtests() |
|