sbsv2/raptor/test/smoke_suite/resource.py
author timothy.murphy@nokia.com
Sat, 01 May 2010 00:09:59 +0100
branchfix
changeset 516 cd8318d5fb3a
parent 479 62411a80435e
child 533 408bfff46ad7
permissions -rw-r--r--
Somewhat more sane choice of directory. Fix problem where winscw migh have had wrong TARGETEXT var.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     1
#
260
6956be913ed6 apply review #3865 comments
Richard Taylor <richard.i.taylor@nokia.com>
parents: 258
diff changeset
     2
# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
3
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     3
# All rights reserved.
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     4
# This component and the accompanying materials are made available
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     5
# under the terms of the License "Eclipse Public License v1.0"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     6
# which accompanies this distribution, and is available
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     8
#
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     9
# Initial Contributors:
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    10
# Nokia Corporation - initial contribution.
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    11
#
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    12
# Contributors:
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    13
#
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    14
# Description: 
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    15
#
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    16
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    17
from raptor_tests import SmokeTest
463
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    18
from raptor_tests import ReplaceEnvs
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    19
from raptor_meta import BldInfFile
3
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    20
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    21
def run():
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    22
	t = SmokeTest()
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    23
	t.id = "30"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    24
	t.name =  "resource"
463
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    25
	t.command = "sbs  -b smoke_suite/test_resources/simple_gui/Bld.inf RESOURCE"
3
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    26
	t.targets = [
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    27
		"$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    28
		"$(EPOCROOT)/epoc32/localisation/group/helloworld.info",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    29
		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.mbm",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    30
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.mbm",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    31
		"$(EPOCROOT)/epoc32/include/helloworld.rsg",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    32
		"$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.rsc",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    33
		"$(EPOCROOT)/epoc32/localisation/helloworld/rsc/helloworld.rpp",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    34
		"$(EPOCROOT)/epoc32/data/z/private/10003a3f/apps/helloworld_reg.rsc",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    35
		"$(EPOCROOT)/epoc32/localisation/helloworld_reg/rsc/helloworld_reg.rpp",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    36
		"$(EPOCROOT)/epoc32/localisation/group/helloworld_reg.info",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    37
		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.rsc",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    38
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.rsc",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    39
		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/private/10003a3f/apps/helloworld_reg.rsc",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    40
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/private/10003a3f/apps/helloworld_reg.rsc"	
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    41
		]
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    42
	
463
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    43
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    44
	t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    45
		"helloworld_exe/helloworld.mbm_bmconvcommands",
466
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    46
		"helloworld_exe/helloworld_sc.rpp",
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    47
		"helloworld_exe/helloworld_sc.rpp.d",
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    48
		"helloworld_reg_exe/helloworld_reg_sc.rpp",
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    49
		"helloworld_reg_exe/helloworld_reg_sc.rpp.d"])
463
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    50
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    51
	t.mustnotmatch = ["HelloWorld.rss.* warning: trigraph"]
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    52
	
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    53
	t.run()
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    54
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    55
	t.id="30a"
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    56
	t.name =  "no_depend_gen_resource"
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    57
	t.usebash = True
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    58
	t.description =  """Check that dependent resources still build correctly even when we turn dependency generation off.  This
466
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    59
			    test cannot really do this reliably, if you think about it, since it can't force make to try building resources
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    60
			    in the 'wrong' order.  What it does attempt is to check that 
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    61
			    the ultimately generated dependency file is ok.
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    62
			    N.B.  It also attempts to ensure that the dependency file is 'minimal'  i.e. that it only references .mbg and .rsg files
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    63
			    that might come from other parts of the same build.  This is important for performance in situations where --no-depend-generate
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    64
			    is used because the weight of 'complete' dependency information would overwhelm make.
463
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    65
			 """
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    66
	buildLocation = ReplaceEnvs("$(EPOCROOT)/epoc32/build/") + BldInfFile.outputPathFragment('smoke_suite/test_resources/resource/group/bld.inf')
466
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    67
	res_depfile= buildLocation+"/dependentresource_/dependentresource_sc.rpp.d"
463
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    68
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    69
	t.targets = [
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    70
		"$(EPOCROOT)/epoc32/include/testresource.rsg",
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    71
		"$(EPOCROOT)/epoc32/include/testresource.hrh",
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    72
		"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r01",
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    73
		"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc",
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    74
		"$(EPOCROOT)/epoc32/release/armv5/urel/testresource.exe",
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    75
		"$(EPOCROOT)/epoc32/localisation/group/testresource.info",
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    76
		"$(EPOCROOT)/epoc32/localisation/testresource/rsc/testresource.rpp",
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    77
		res_depfile
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    78
		]
92c43194abb5 test: resource dependencies - to be used when ensuring that depcrunching works
timothy.murphy@nokia.com
parents: 393
diff changeset
    79
3
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    80
	t.addbuildtargets('smoke_suite/test_resources/resource/group/bld.inf', [	
466
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    81
		"testresource_/testresource_02.rpp",
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    82
		"testresource_/testresource_02.rpp.d",
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    83
		"testresource_/testresource_01.rpp",
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    84
		"testresource_/testresource_01.rpp.d",
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    85
		"testresource_/testresource_sc.rpp",
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    86
		"testresource_/testresource_sc.rpp.d"])
3
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    87
466
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    88
	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)
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    89
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    90
	t.mustnotmatch = []
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    91
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    92
	t.mustmatch = [
479
62411a80435e fix: Make resource dep minimisation work when output file starts with a line containing "\"
timothy.murphy@nokia.com
parents: 473
diff changeset
    93
			"4 .*.dependentresource_.dependentresource_sc.rpp.d"
466
b9e5cf94aac3 fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents: 463
diff changeset
    94
		      ]
3
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    95
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    96
	t.run()
473
ae731bee7d46 resource test - small review comment fixes
timothy.murphy@nokia.com
parents: 466
diff changeset
    97
ae731bee7d46 resource test - small review comment fixes
timothy.murphy@nokia.com
parents: 466
diff changeset
    98
	t.name = 'resource'
ae731bee7d46 resource test - small review comment fixes
timothy.murphy@nokia.com
parents: 466
diff changeset
    99
	t.print_result()
3
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   100
	return t