configurationengine/source/cone/runtests.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 
       
    17 
       
    18 import os,sys,unittest
       
    19 from optparse import OptionParser, OptionGroup
       
    20 
       
    21 ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
       
    22 sys.path.insert(0, os.path.join(ROOT_PATH,'..'))
       
    23 #sys.path.insert(0, os.path.join(ROOT_PATH,'../testautomation'))
       
    24 
       
    25 import cone.storage.tests
       
    26 import cone.core.tests
       
    27 import cone.confml.tests
       
    28 import cone.carbon.tests
       
    29 import cone.public.tests
       
    30 #from testautomation import testcli
       
    31 
       
    32 def collect_suite():
       
    33     suite = unittest.TestSuite()
       
    34     suite.addTests(cone.storage.tests.collect_suite())
       
    35     suite.addTests(cone.core.tests.collect_suite())
       
    36     suite.addTests(cone.confml.tests.collect_suite())
       
    37     suite.addTests(cone.carbon.tests.collect_suite())
       
    38     suite.addTests(cone.public.tests.collect_suite())
       
    39     return suite
       
    40 
       
    41 if __name__ == '__main__':
       
    42     import nose
       
    43     setuptools_incompat = ('report', 'prepareTest',
       
    44                            'prepareTestLoader', 'prepareTestRunner',
       
    45                            'setOutputStream')
       
    46 
       
    47     plugins = nose.plugins.manager.RestrictedPluginManager(exclude=setuptools_incompat)
       
    48     allfiles = nose.config.all_config_files() + ['nose_unittests.cfg']
       
    49     conf = nose.config.Config(files=allfiles,
       
    50                   plugins=plugins)
       
    51     conf.configure(argv=['collector'])
       
    52     print "conf :", conf.include
       
    53     nose.main(config=conf)
       
    54 
       
    55 #if __name__ == '__main__':
       
    56 #    testcli.run(collect_suite())
       
    57