0
|
1 |
#
|
|
2 |
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
# All rights reserved.
|
|
4 |
# This component and the accompanying materials are made available
|
|
5 |
# under the terms of "Eclipse Public License v1.0"
|
|
6 |
# which accompanies this distribution, and is available
|
|
7 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
#
|
|
9 |
# Initial Contributors:
|
|
10 |
# Nokia Corporation - initial contribution.
|
|
11 |
#
|
|
12 |
# Contributors:
|
|
13 |
#
|
|
14 |
# Description:
|
|
15 |
#
|
|
16 |
|
|
17 |
import unittest, os, sys
|
|
18 |
|
|
19 |
ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
|
|
20 |
SOURCE_ROOT = os.path.normpath(os.path.join(ROOT_PATH, '../..'))
|
|
21 |
PLUGIN_SOURCE_ROOT = os.path.normpath(os.path.join(SOURCE_ROOT, 'plugins'))
|
|
22 |
assert os.path.split(SOURCE_ROOT)[1] == 'source'
|
|
23 |
assert os.path.split(PLUGIN_SOURCE_ROOT)[1] == 'plugins'
|
|
24 |
|
|
25 |
def _setup():
|
|
26 |
"""
|
|
27 |
Set up everything so that running "python cone_tool.py" finds the ConE
|
|
28 |
and plug-in modules.
|
|
29 |
"""
|
3
|
30 |
from testautomation import plugin_utils
|
0
|
31 |
|
|
32 |
# Collect all needed plug-in source directories (all in 'common')
|
|
33 |
plugin_sources = plugin_utils.find_plugin_sources(os.path.join(PLUGIN_SOURCE_ROOT, 'common'))
|
|
34 |
plugin_source_paths = [path for path, _ in plugin_sources]
|
|
35 |
|
|
36 |
# Generate egg-info for the plug-ins if necessary
|
3
|
37 |
from testautomation import build_egg_info
|
0
|
38 |
for path in plugin_source_paths:
|
|
39 |
build_egg_info.generate_egg_info(path)
|
|
40 |
|
|
41 |
_setup()
|
|
42 |
|