sbsv2/raptor/test/smoke_suite/resource.py
author jjkang
Fri, 25 Jun 2010 19:56:45 +0800
changeset 604 b33dd54aaa52
parent 602 3145852acc89
child 616 24e4ef208cca
permissions -rw-r--r--
add cpptoolsplat
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
602
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     1
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     2
# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     3
# All rights reserved.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     4
# This component and the accompanying materials are made available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     5
# under the terms of the License "Eclipse Public License v1.0"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     6
# which accompanies this distribution, and is available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     8
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     9
# Initial Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    10
# Nokia Corporation - initial contribution.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    11
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    12
# Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    13
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    14
# Description: 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    15
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    16
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    17
from raptor_tests import SmokeTest
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    18
from raptor_tests import ReplaceEnvs
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    19
from raptor_meta import BldInfFile
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    20
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    21
def run():
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    22
	t = SmokeTest()
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    23
	t.id = "30"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    24
	t.name =  "resource"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    25
	t.command = "sbs  -b smoke_suite/test_resources/simple_gui/Bld.inf RESOURCE"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    26
	t.targets = [
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    27
		"$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    28
		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.mbm",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    29
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.mbm",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    30
		"$(EPOCROOT)/epoc32/include/helloworld.rsg",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    31
		"$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.rsc",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    32
		"$(EPOCROOT)/epoc32/data/z/private/10003a3f/apps/helloworld_reg.rsc",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    33
		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.rsc",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    34
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.rsc",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    35
		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/private/10003a3f/apps/helloworld_reg.rsc",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    36
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/private/10003a3f/apps/helloworld_reg.rsc"	
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    37
		]
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    38
	
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    39
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    40
	t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    41
		"helloworld_exe/helloworld.mbm_bmconvcommands",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    42
		"helloworld_exe/helloworld_HelloWorld_sc.rpp",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    43
		"helloworld_exe/helloworld_HelloWorld_sc.rpp.d",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    44
		"helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    45
		"helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d"])
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    46
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    47
	t.mustnotmatch = ["HelloWorld.rss.* warning: trigraph"]
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    48
	
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    49
	t.run()
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    50
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    51
	t.id="30a"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    52
	t.name =  "no_depend_gen_resource"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    53
	t.usebash = True
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    54
	t.description =  """Check that dependent resources still build correctly even when we turn dependency generation off.  This
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    55
			    test cannot really do this reliably, if you think about it, since it can't force make to try building resources
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    56
			    in the 'wrong' order.  What it does attempt is to check that 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    57
			    the ultimately generated dependency file is ok.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    58
			    N.B.  It also attempts to ensure that the dependency file is 'minimal'  i.e. that it only references .mbg and .rsg files
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    59
			    that might come from other parts of the same build.  This is important for performance in situations where --no-depend-generate
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    60
			    is used because the weight of 'complete' dependency information would overwhelm make.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    61
			 """
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    62
	buildLocation = ReplaceEnvs("$(EPOCROOT)/epoc32/build/") + BldInfFile.outputPathFragment('smoke_suite/test_resources/resource/group/bld.inf')
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    63
	res_depfile= buildLocation+"/dependentresource_/dependentresource_dependentresource_sc.rpp.d"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    64
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    65
	t.targets = [
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    66
		"$(EPOCROOT)/epoc32/include/testresource.rsg",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    67
		"$(EPOCROOT)/epoc32/include/testresource.hrh",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    68
		"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r01",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    69
		"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    70
		"$(EPOCROOT)/epoc32/release/armv5/urel/testresource.exe",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    71
		res_depfile
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    72
		]
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    73
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    74
	t.addbuildtargets('smoke_suite/test_resources/resource/group/bld.inf', [	
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    75
		"testresource_/testresource_testresource_02.rpp",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    76
		"testresource_/testresource_testresource_01.rpp",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    77
		"testresource_/testresource_testresource_01.rpp.d",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    78
		"testresource_/testresource_testresource_sc.rpp"])
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    79
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    80
	t.command = "sbs -b smoke_suite/test_resources/resource/group/bld.inf  -c armv5_urel reallyclean ; sbs --no-depend-generate -j 16 -b smoke_suite/test_resources/resource/group/bld.inf -c armv5_urel -f ${SBSLOGFILE} -m ${SBSMAKEFILE} && grep 'epoc32.include.testresource.rsg' %s && wc -l %s " % (res_depfile, res_depfile)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    81
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    82
	t.mustnotmatch = []
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    83
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    84
	t.mustmatch = [
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    85
			"[23] .*.dependentresource_.dependentresource_dependentresource_sc.rpp.d"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    86
		      ]
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    87
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    88
	t.run()
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    89
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    90
	t.name = 'resource'
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    91
	t.print_result()
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    92
	return t