sbsv2/raptor/test/smoke_suite/tracecompiler_general.py
changeset 13 c327db0664bb
child 18 de5b887c98f7
equal deleted inserted replaced
12:5e7562f67577 13:c327db0664bb
       
     1 #
       
     2 # Copyright (c) 2009-2010 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 the License "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 from raptor_tests import SmokeTest
       
    18 from raptor_tests import AntiTargetSmokeTest
       
    19 
       
    20 def run():
       
    21 	t = SmokeTest()
       
    22 	t.description = "Testcases (ID 0101a - 0101d) test trace compiler"
       
    23 	# General test for trace compiler, which generates
       
    24 	# 1. trace headers like <source>Traces.h
       
    25 	# 2. fixed_id.definitions
       
    26 	# 3. dictionary files like <project name>_<UID>_Dictionary.xml
       
    27 	# 4. trace definitions like <project name>_<UID>_TraceDefinitions.h
       
    28 	t.id = "101a"
       
    29 	t.name = "TC_general"
       
    30 	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf -c armv5.tracecompiler"	
       
    31 	t.targets = [
       
    32 		"$(EPOCROOT)/epoc32/release/armv5/lib/testTC.dso",
       
    33 		"$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.dso",
       
    34 		"$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll",
       
    35 		"$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll.map",
       
    36 		"$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll",
       
    37 		"$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll.map",
       
    38 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitTraces.h",
       
    39 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitmainTraces.h",
       
    40 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitpermparserTraces.h",	
       
    41 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/fixed_id.definitions",
       
    42 		"$(EPOCROOT)/epoc32/ost_dictionaries/testTC_0x1000008d_Dictionary.xml",
       
    43 		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/testTC_0x1000008d_TraceDefinitions.h"
       
    44 		]
       
    45 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf', [
       
    46 		"testtc_dll/armv5/udeb/wlanhwinit.o",
       
    47 		"testtc_dll/armv5/udeb/wlanhwinit.o.d",
       
    48 		"testtc_dll/armv5/udeb/wlanhwinitmain.o",
       
    49 		"testtc_dll/armv5/udeb/wlanhwinitmain.o.d",
       
    50 		"testtc_dll/armv5/udeb/wlanhwinitpermparser.o",
       
    51 		"testtc_dll/armv5/udeb/wlanhwinitpermparser.o.d",
       
    52 		"testtc_dll/armv5/udeb/testTC_udeb_objects.via",
       
    53 		"testtc_dll/armv5/udeb/testTC{000a0000}.def",
       
    54 		"testtc_dll/armv5/urel/wlanhwinit.o",
       
    55 		"testtc_dll/armv5/urel/wlanhwinit.o.d",
       
    56 		"testtc_dll/armv5/urel/wlanhwinitmain.o",
       
    57 		"testtc_dll/armv5/urel/wlanhwinitmain.o.d",
       
    58 		"testtc_dll/armv5/urel/wlanhwinitpermparser.o",
       
    59 		"testtc_dll/armv5/urel/wlanhwinitpermparser.o.d",	
       
    60 		"testtc_dll/armv5/urel/testTC_urel_objects.via",
       
    61 		"testtc_dll/armv5/urel/testTC{000a0000}.def",
       
    62 		"testtc_dll/tracecompile_testTC_1000008d.done"
       
    63 	])
       
    64 	t.run()
       
    65 	
       
    66 	# General CLEAN test for trace compiler outputs
       
    67 	t = AntiTargetSmokeTest()
       
    68 	t.id = "101b"
       
    69 	t.name = "TC_general_CLEAN"
       
    70 	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf -c armv5.tracecompiler CLEAN" 	
       
    71 	t.antitargets = [
       
    72 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitTraces.h",
       
    73 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitmainTraces.h",
       
    74 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitpermparserTraces.h"
       
    75 		]
       
    76 	t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
       
    77 		"testtc_dll/tracecompile_testTC_1000008d.done"
       
    78 	])
       
    79 	t.run()
       
    80 			
       
    81 	t = SmokeTest()
       
    82 	t.id = "101c"
       
    83 	t.name = "TC_bv_path"
       
    84 	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_featurevariant/group/bld.inf -c armv5.tracecompiler" 
       
    85 	t.targets = [
       
    86 		"$(EPOCROOT)/epoc32/release/armv5/udeb/HelloWorld.exe",
       
    87 		"$(EPOCROOT)/epoc32/release/armv5/udeb/HelloWorld.exe.map",
       
    88 		"$(EPOCROOT)/epoc32/release/armv5/urel/HelloWorld.exe",
       
    89 		"$(EPOCROOT)/epoc32/release/armv5/urel/HelloWorld.exe.map",
       
    90 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/TC_featurevariant/traces/HelloWorldTraces.h",
       
    91 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/TC_featurevariant/traces/fixed_id.definitions",
       
    92 		"$(EPOCROOT)/epoc32/ost_dictionaries/HelloWorld_0xe78a5aa3_Dictionary.xml",
       
    93 		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/HelloWorld_0xe78a5aa3_TraceDefinitions.h"
       
    94 		]
       
    95 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/TC_featurevariant/group/bld.inf', [
       
    96 		"helloworld_exe/armv5/udeb/HelloWorld.o",
       
    97 		"helloworld_exe/armv5/udeb/HelloWorld.o.d",
       
    98 		"helloworld_exe/armv5/udeb/HelloWorld_udeb_objects.via",
       
    99 		"helloworld_exe/armv5/urel/HelloWorld.o",
       
   100 		"helloworld_exe/armv5/urel/HelloWorld.o.d",
       
   101 		"helloworld_exe/armv5/urel/HelloWorld_urel_objects.via",
       
   102 		"helloworld_exe/tracecompile_HelloWorld_e78a5aa3.done"
       
   103 	])
       
   104 	t.run()
       
   105 
       
   106 	# 101d-101f test trace compiler auto mechanism, which is used to avoid wasting time on source 
       
   107 	# containing no osttraces.
       
   108 	# Trace compiler only runs when there are osttraces code in source. Raptor decides this by
       
   109 	# checking whether there is a "traces" or "traces_<prj_name>" folder in USERINCLUDE in a mmp file. 
       
   110 	t = SmokeTest()
       
   111 	t.id = "101d"
       
   112 	t.name = "TC_autorun1"
       
   113 	# Run - USERINCLUDE ../traces_autorun1
       
   114 	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \
       
   115 			" -p autorun1.mmp"
       
   116 	t.targets = [
       
   117 		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
       
   118 		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
       
   119 		]
       
   120 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
       
   121 		"test_/armv5/udeb/test.o",
       
   122 		"test_/armv5/urel/test.o",
       
   123 		"test_/tracecompile_autorun1_00000001.done"
       
   124 	])
       
   125 	t.run()
       
   126 	
       
   127 	t = AntiTargetSmokeTest()
       
   128 	t.id = "101e"
       
   129 	t.name = "TC_autorun2"
       
   130 	# No run - USERINCLUDE ./tracesnotmatch
       
   131 	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \
       
   132 			" -p autorun2.mmp CLEAN " + \
       
   133 			"&& sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \
       
   134 			" -p autorun2.mmp"
       
   135 	t.targets = [
       
   136 		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
       
   137 		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
       
   138 		]
       
   139 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
       
   140 		"test_/armv5/udeb/test.o",
       
   141 		"test_/armv5/urel/test.o",
       
   142 	])
       
   143 	t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
       
   144 		"test_/tracecompile_autorun2_00000001.done"
       
   145 	])
       
   146 	t.run()
       
   147 
       
   148 	t = AntiTargetSmokeTest()
       
   149 	t.id = "101f"
       
   150 	t.name = "TC_autorun3"
       
   151 	# No run - no UID
       
   152 	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \
       
   153 			" -p autorun3.mmp CLEAN " + \
       
   154 			"&& sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \
       
   155 			" -p autorun3.mmp"
       
   156 	t.targets = [
       
   157 		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
       
   158 		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
       
   159 		]
       
   160 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
       
   161 		"test_/armv5/udeb/test.o",
       
   162 		"test_/armv5/urel/test.o",
       
   163 	])
       
   164 	t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
       
   165 		"test_/tracecompile_autorun3_00000001.done"
       
   166 	])
       
   167 	t.run()
       
   168 
       
   169 	# Test trace compiler doesn't run when it is switched off
       
   170 	# Trace compiler switch is off by default. To turn it on use variant ".tracecompiler". 
       
   171 	t = AntiTargetSmokeTest()
       
   172 	t.id = "101g"
       
   173 	t.name = "TC_switch_off"
       
   174 	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \
       
   175 			" -p autorun1.mmp CLEAN " + \
       
   176 			"&& sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5 -p autorun1.mmp"
       
   177 	t.targets = [
       
   178 		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
       
   179 		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
       
   180 		]
       
   181 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
       
   182 		"test_/armv5/udeb/test.o",
       
   183 		"test_/armv5/urel/test.o"
       
   184 	])
       
   185 	t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
       
   186 		"test_/tracecompile_autorun1_00000001.done"
       
   187 	])
       
   188 	t.run()
       
   189 
       
   190 
       
   191 	t.id = "101"
       
   192 	t.name = "tracecompiler_general"
       
   193 	t.print_result()
       
   194 	return t
       
   195