buildframework/helium/tools/common/python/lib/cpythontest/test_dependancygraph.py
author wbernard
Wed, 23 Dec 2009 19:29:07 +0200
changeset 179 d8ac696cc51f
permissions -rw-r--r--
helium_7.0-r14027
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     1
#============================================================================ 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     2
#Name        : test_dependancygraph.py 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     3
#Part of     : Helium 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     4
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     5
#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     6
#All rights reserved.
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     7
#This component and the accompanying materials are made available
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     8
#under the terms of the License "Eclipse Public License v1.0"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     9
#which accompanies this distribution, and is available
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    10
#at the URL "http://www.eclipse.org/legal/epl-v10.html".
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    11
#
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    12
#Initial Contributors:
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    13
#Nokia Corporation - initial contribution.
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    14
#
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    15
#Contributors:
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    16
#
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    17
#Description:
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    18
#===============================================================================
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    19
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    20
import unittest
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    21
import dependancygraph
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    22
import logging
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    23
import tempfile
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    24
import os
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    25
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    26
_logger = logging.getLogger('test.dependancygraph')
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    27
logging.basicConfig(level=logging.INFO)
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    28
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    29
class DependancygraphTest(unittest.TestCase):
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    30
        
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    31
    def test_dependancygraph(self):
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    32
        (fd, filename) = tempfile.mkstemp()
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    33
        f = os.fdopen(fd, 'w')
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    34
        f.write('test')
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    35
        f.close()
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    36
        dependancygraph.createGraph(os.path.join(os.environ['HELIUM_HOME'], 'config/ivy/ivy.xml'), filename, os.path.join(os.environ['HELIUM_HOME'], 'external/python/lib'), os.path.join(os.environ['HELIUM_HOME'], 'extensions/nokia/external/python/lib'), False)