sbsv2/raptor/test/smoke_suite/exe_armv5_winscw_single_file.py
changeset 3 e1eecf4d390d
child 472 d1500715c073
equal deleted inserted replaced
1:be27ed110b50 3:e1eecf4d390d
       
     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 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 
       
    19 def run():
       
    20 	result = SmokeTest.PASS
       
    21 
       
    22 	t = SmokeTest()
       
    23 	t.name = "exe_armv5_winscw_single_file_baseline_build"
       
    24 
       
    25 	# Build component
       
    26 	t.id = "0089a"
       
    27 	t.command = "sbs -b smoke_suite/test_resources/simple_gui/Bld.inf -c armv5 -c winscw"
       
    28 	t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [
       
    29 		"helloworld_exe/helloworld.mbm_bmconvcommands",
       
    30 		"helloworld_exe/helloworld__resource_apps_sc.rpp",
       
    31 		"helloworld_exe/helloworld__resource_apps_sc.rpp.d",
       
    32 		"helloworld_exe/armv5/udeb/HelloWorld_Application.o",
       
    33 		"helloworld_exe/armv5/udeb/HelloWorld_Application.o.d",
       
    34 		"helloworld_exe/armv5/udeb/HelloWorld_AppUi.o",
       
    35 		"helloworld_exe/armv5/udeb/HelloWorld_AppUi.o.d",
       
    36 		"helloworld_exe/armv5/udeb/HelloWorld_AppView.o",
       
    37 		"helloworld_exe/armv5/udeb/HelloWorld_AppView.o.d",
       
    38 		"helloworld_exe/armv5/udeb/HelloWorld_Document.o",
       
    39 		"helloworld_exe/armv5/udeb/HelloWorld_Document.o.d",
       
    40 		"helloworld_exe/armv5/udeb/HelloWorld_Main.o",
       
    41 		"helloworld_exe/armv5/udeb/HelloWorld_Main.o.d",
       
    42 		"helloworld_exe/armv5/udeb/helloworld_udeb_objects.via",
       
    43 		"helloworld_exe/armv5/urel/HelloWorld_Application.o",
       
    44 		"helloworld_exe/armv5/urel/HelloWorld_Application.o.d",
       
    45 		"helloworld_exe/armv5/urel/HelloWorld_AppUi.o",
       
    46 		"helloworld_exe/armv5/urel/HelloWorld_AppUi.o.d",
       
    47 		"helloworld_exe/armv5/urel/HelloWorld_AppView.o",
       
    48 		"helloworld_exe/armv5/urel/HelloWorld_AppView.o.d",
       
    49 		"helloworld_exe/armv5/urel/HelloWorld_Document.o",
       
    50 		"helloworld_exe/armv5/urel/HelloWorld_Document.o.d",
       
    51 		"helloworld_exe/armv5/urel/HelloWorld_Main.o",
       
    52 		"helloworld_exe/armv5/urel/HelloWorld_Main.o.d",
       
    53 		"helloworld_exe/armv5/urel/helloworld_urel_objects.via",
       
    54 		"helloworld_exe/winscw/udeb/helloworld.UID.CPP",
       
    55 		"helloworld_exe/winscw/udeb/HelloWorld_Application.dep",
       
    56 		"helloworld_exe/winscw/udeb/HelloWorld_Application.o",
       
    57 		"helloworld_exe/winscw/udeb/HelloWorld_Application.o.d",
       
    58 		"helloworld_exe/winscw/udeb/HelloWorld_AppUi.dep",
       
    59 		"helloworld_exe/winscw/udeb/HelloWorld_AppUi.o",
       
    60 		"helloworld_exe/winscw/udeb/HelloWorld_AppUi.o.d",
       
    61 		"helloworld_exe/winscw/udeb/HelloWorld_AppView.dep",
       
    62 		"helloworld_exe/winscw/udeb/HelloWorld_AppView.o",
       
    63 		"helloworld_exe/winscw/udeb/HelloWorld_AppView.o.d",
       
    64 		"helloworld_exe/winscw/udeb/HelloWorld_Document.dep",
       
    65 		"helloworld_exe/winscw/udeb/HelloWorld_Document.o",
       
    66 		"helloworld_exe/winscw/udeb/HelloWorld_Document.o.d",
       
    67 		"helloworld_exe/winscw/udeb/HelloWorld_Main.dep",
       
    68 		"helloworld_exe/winscw/udeb/HelloWorld_Main.o",
       
    69 		"helloworld_exe/winscw/udeb/HelloWorld_Main.o.d",
       
    70 		"helloworld_exe/winscw/udeb/helloworld_udeb_objects.lrf",
       
    71 		"helloworld_exe/winscw/udeb/helloworld_UID_.dep",
       
    72 		"helloworld_exe/winscw/udeb/helloworld_UID_.o",
       
    73 		"helloworld_exe/winscw/udeb/helloworld_UID_.o.d",
       
    74 		"helloworld_exe/winscw/urel/helloworld.UID.CPP",
       
    75 		"helloworld_exe/winscw/urel/HelloWorld_Application.dep",
       
    76 		"helloworld_exe/winscw/urel/HelloWorld_Application.o",
       
    77 		"helloworld_exe/winscw/urel/HelloWorld_Application.o.d",
       
    78 		"helloworld_exe/winscw/urel/HelloWorld_AppUi.dep",
       
    79 		"helloworld_exe/winscw/urel/HelloWorld_AppUi.o",
       
    80 		"helloworld_exe/winscw/urel/HelloWorld_AppUi.o.d",
       
    81 		"helloworld_exe/winscw/urel/HelloWorld_AppView.dep",
       
    82 		"helloworld_exe/winscw/urel/HelloWorld_AppView.o",
       
    83 		"helloworld_exe/winscw/urel/HelloWorld_AppView.o.d",
       
    84 		"helloworld_exe/winscw/urel/HelloWorld_Document.dep",
       
    85 		"helloworld_exe/winscw/urel/HelloWorld_Document.o",
       
    86 		"helloworld_exe/winscw/urel/HelloWorld_Document.o.d",
       
    87 		"helloworld_exe/winscw/urel/HelloWorld_Main.dep",
       
    88 		"helloworld_exe/winscw/urel/HelloWorld_Main.o",
       
    89 		"helloworld_exe/winscw/urel/HelloWorld_Main.o.d",
       
    90 		"helloworld_exe/winscw/urel/helloworld_UID_.dep",
       
    91 		"helloworld_exe/winscw/urel/helloworld_UID_.o",
       
    92 		"helloworld_exe/winscw/urel/helloworld_UID_.o.d",
       
    93 		"helloworld_exe/winscw/urel/helloworld_urel_objects.lrf",
       
    94 		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp",
       
    95 		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp.d"
       
    96 	])
       
    97 
       
    98 	t.run()
       
    99 	if t.result == SmokeTest.FAIL:
       
   100 		result = SmokeTest.FAIL
       
   101 
       
   102 	# Ensure we don't clean up from the previous build in any subsequent runs
       
   103 	t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [])
       
   104 	t.targets = []
       
   105 	t.usebash = True
       
   106 
       
   107 	# Touch both a straight source and a resource file and confirm we can recompile in isolation without additional impact
       
   108 	t.id = "0089b"
       
   109 	t.name = "exe_armv5_winscw_single_file_touch_rebuild"
       
   110 	t.command = """
       
   111 		sleep 1
       
   112 		touch smoke_suite/test_resources/simple_gui/HelloWorld_Document.cpp
       
   113 		touch smoke_suite/test_resources/simple_gui/HelloWorld.rss
       
   114 		sbs -f - --source-target=smoke_suite/test_resources/simple_gui/HelloWorld_Document.cpp --source-target=smoke_suite/test_resources/simple_gui/HelloWorld.rss -b smoke_suite/test_resources/simple_gui/Bld.inf"""
       
   115 	t.countmatch = [
       
   116 		[".*recipe name='resource(preprocess|header|compile)'", 3],
       
   117 		[".*recipe name='compile'.*", 2],
       
   118 		[".*recipe name='win32compile2object'.*", 2]
       
   119 	]
       
   120 	t.mustnotmatch = [
       
   121 		".*recipe name='(win32simplelink|postlink|link)'.*"
       
   122 	]
       
   123 
       
   124 	t.run()
       
   125 	if t.result == SmokeTest.FAIL:
       
   126 		result = SmokeTest.FAIL
       
   127 
       
   128 	# Attempt separate source and resource file compile where nothing should be done
       
   129 	t.id = "0089c"
       
   130 	t.name = "exe_armv5_winscw_single_file_notouch_rebuild"
       
   131 	t.command = "sbs -f - --source-target=smoke_suite/test_resources/simple_gui/HelloWorld_Document.cpp --source-target=smoke_suite/test_resources/simple_gui/HelloWorld.rss -b smoke_suite/test_resources/simple_gui/Bld.inf"
       
   132 	t.mustmatch = []
       
   133 	t.countmatch = [
       
   134 		[".*make.*Nothing to be done for.*SOURCETARGET_.*", 10]
       
   135 	]
       
   136 	t.mustnotmatch = [
       
   137 		".*recipe name='(resourcepreprocess|win32compile2object|compile|win32simplelink|postlink|link)'.*"
       
   138 	]
       
   139 
       
   140 	t.run()
       
   141 	if t.result == SmokeTest.FAIL:
       
   142 		result = SmokeTest.FAIL
       
   143 
       
   144 	t.id = "89"
       
   145 	t.name = "exe_armv5_winscw_single_file"
       
   146 	t.description = """Builds a component and tests single file compilation for straight source and resource files"""
       
   147 	t.result = result
       
   148 	t.print_result()
       
   149 	return t