configurationengine/source/plugins/common/ConeTemplatePlugin/templatemlplugin/tests/__init__.py
changeset 0 2e8eeb919028
child 3 e7e0ae78773e
equal deleted inserted replaced
-1:000000000000 0:2e8eeb919028
       
     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 import sys, os, unittest
       
    17 
       
    18 # Path to the directory where this file is located
       
    19 ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
       
    20 
       
    21 # Import common plug-in initialization
       
    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)
       
    28 
       
    29 def collect_suite():
       
    30     return plugin_utils.collect_test_suite_from_dir(ROOT_PATH)
       
    31 
       
    32 def runtests():
       
    33     unittest.TextTestRunner(verbosity=2).run(collect_suite())
       
    34 
       
    35 if __name__ == '__main__':
       
    36     runtests()