mmtestenv/mmtesttools/Build/buildutils/testDataMbcUtils.py
changeset 0 40261b775718
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     1 
       
     2 # Copyright (c) 2008-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 """Data used by testMbcUtils - give as python strings etc. Separated out to make the test code easier to understand"""
       
    17 
       
    18 # the following is taken from misc.mbc. Contains all features we seem to use. Specific contents not really important
       
    19 import1 = r"""
       
    20 // Misc.mbc
       
    21 //
       
    22 // Copyright (c) Symbian Software Ltd 2004 - 2008.  All rights reserved.
       
    23 //
       
    24 // non-optional modules for misc components
       
    25 
       
    26 SECTION_DIRS
       
    27 
       
    28 ..\..\ECam\framework\group
       
    29 ..\..\ECam\plugins\group
       
    30 ..\..\mmcommon\group
       
    31 ..\..\openmax\il\group
       
    32 ..\..\mdf\group
       
    33 ..\..\mobiletv\hai\dvbh\group
       
    34 ..\..\a3f\traces\group
       
    35 ..\..\a3f\refmmrc\group
       
    36 ..\..\a3f\a3fserverstart\group
       
    37 ..\..\a3f\a3fdevsound\group
       
    38 ..\..\a3f\acf\group
       
    39 ..\..\a3f\acl\group
       
    40 ..\..\a3f\refacladaptation\group
       
    41 ..\..\a3f\devsoundadaptationinfo\group
       
    42 ..\..\packetvideo\group
       
    43 ..\..\3gplibrary\group
       
    44 
       
    45 SECTION_OPTIONALDIRS
       
    46 
       
    47 ..\..\xvidpu\group
       
    48 
       
    49 SECTION_COMMANDS
       
    50 
       
    51 // oneoff - TImageViewer
       
    52 oneoff ..\..\ICL\group abld -k test export
       
    53 oneoff ..\..\ICL\group abld -k test build arm4 timageviewer
       
    54 oneoff ..\..\ICL\group abld -k test build winscw timageviewer
       
    55 """
       
    56 
       
    57 result1 = (
       
    58 None, # will be filled in runtime with the filename
       
    59 ['..\\..\\ECam\\framework\\group',
       
    60 '..\\..\\ECam\\plugins\\group',
       
    61 '..\\..\\mmcommon\\group',
       
    62 '..\\..\\openmax\\il\\group',
       
    63 '..\\..\\mdf\\group',
       
    64 '..\\..\\mobiletv\\hai\\dvbh\\group',
       
    65 '..\\..\\a3f\\traces\\group',
       
    66 '..\\..\\a3f\\refmmrc\\group',
       
    67 '..\\..\\a3f\\a3fserverstart\\group',
       
    68 '..\\..\\a3f\\a3fdevsound\\group',
       
    69 '..\\..\\a3f\\acf\\group',
       
    70 '..\\..\\a3f\\acl\\group',
       
    71 '..\\..\\a3f\\refacladaptation\\group',
       
    72 '..\\..\\a3f\\devsoundadaptationinfo\\group',
       
    73 '..\\..\\packetvideo\\group',
       
    74 '..\\..\\3gplibrary\\group'],
       
    75 ['..\\..\\xvidpu\\group'],
       
    76 [('..\\..\\ICL\\group', 'abld -k test export'),
       
    77 ('..\\..\\ICL\\group', 'abld -k test build arm4 timageviewer'),
       
    78 ('..\\..\\ICL\\group', 'abld -k test build winscw timageviewer')])
       
    79 
       
    80 # import2 is a list of three possible files - misc.mbc is actually curtailed. miscopt.mbc is just comment
       
    81 import2 = [
       
    82 r"""// Misc.mbc
       
    83 //
       
    84 // Copyright (c) Symbian Software Ltd 2004 - 2008.  All rights reserved.
       
    85 //
       
    86 // non-optional modules for misc components
       
    87 
       
    88 SECTION_DIRS
       
    89 
       
    90 ..\..\ECam\framework\group
       
    91 ..\..\ECam\plugins\group
       
    92 ..\..\mmcommon\group
       
    93 ..\..\openmax\il\group""",
       
    94 r"""// MiscOpt.mbc
       
    95 //
       
    96 // Copyright (c) Symbian Software Ltd 2004 - 2007.  All rights reserved.
       
    97 //
       
    98 // Optional misc components
       
    99 
       
   100 SECTION_DIRS
       
   101 
       
   102 //..\..\mm3plane\mm-tech\mmrc\mmrcfw\group""",
       
   103 r"""// icl.mbc
       
   104 //
       
   105 // Copyright (c) Symbian Software Ltd 2004 - 2007.  All rights reserved.
       
   106 //
       
   107 // non-optional ICL modules
       
   108 
       
   109 SECTION_DIRS
       
   110 
       
   111 ..\..\ICL\group
       
   112 ..\..\ICL\plugins\group
       
   113 """]
       
   114 
       
   115 result2 = [
       
   116     (None, ['..\\..\\ECam\\framework\\group',
       
   117     '..\\..\\ECam\\plugins\\group',
       
   118     '..\\..\\mmcommon\\group',
       
   119     '..\\..\\openmax\\il\\group'], [], []),
       
   120     (None, [], [], []),
       
   121     (None, ['..\\..\\ICL\\group', '..\\..\\ICL\\plugins\\group'], [], [])]
       
   122 
       
   123 badImport1 = r"""
       
   124 
       
   125 SECTION_DIRS
       
   126 this is a bad dir
       
   127 """
       
   128 
       
   129 badImport2 = r"""
       
   130 
       
   131 SECTION_COMMANDS
       
   132 
       
   133 // oneoff - TImageViewer
       
   134 oneoffbad ..\..\ICL\group abld -k test export
       
   135 """
       
   136 
       
   137 # .mbc file used for intTest
       
   138 intTestMbcFile = r"""
       
   139 // intTestMbc
       
   140 
       
   141 SECTION_DIRS
       
   142 
       
   143 .\x
       
   144 .\y
       
   145 
       
   146 SECTION_OPTIONALDIRS
       
   147 
       
   148 .\z
       
   149 """
       
   150 
       
   151 testFolderList1 = [
       
   152     (False, None, "Hello there"),
       
   153     (True, None, "Something missing"),
       
   154     (True, "foo", "XX"),
       
   155     (True, "bar", "XX"),
       
   156     ]
       
   157 
       
   158 testXmlFile1 = """<SystemDefinition name="BLAH" schema="2.0.0">
       
   159   <systemModel>
       
   160     <layer name="NEW_CUSTOM_LAYER">
       
   161       <collection name="Fake Collection">
       
   162         <component name="Fake Multimedia">
       
   163           <!-- Something missing -->
       
   164           <unit bldFile="foo" /><!-- XX -->
       
   165           <unit bldFile="bar" /><!-- XX -->
       
   166         </component>
       
   167       </collection>
       
   168     </layer>
       
   169   </systemModel>
       
   170 </SystemDefinition>
       
   171 """