sbsv2/raptor/test/smoke_suite/dependencies.py
author Ross Qin <ross.qin@nokia.com>
Tue, 30 Nov 2010 14:05:41 +0800
changeset 713 7b7f0409fc00
parent 674 37ee82a83d43
permissions -rw-r--r--
merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
591
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
     1
#
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
     2
# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
     3
# All rights reserved.
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
     4
# This component and the accompanying materials are made available
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
     5
# under the terms of the License "Eclipse Public License v1.0"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
     6
# which accompanies this distribution, and is available
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
     8
#
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
     9
# Initial Contributors:
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    10
# Nokia Corporation - initial contribution.
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    11
#
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    12
# Contributors:
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    13
#
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    14
# Description: 
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    15
#
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    16
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    17
from raptor_tests import AntiTargetSmokeTest
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    18
from raptor_meta import BldInfFile
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    19
import os
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    20
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    21
def run():
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    22
	t = AntiTargetSmokeTest()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    23
	t.usebash = True
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    24
	
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    25
	genericTargets = [
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    26
		"$(EPOCROOT)/epoc32/release/armv5/udeb/dependency.exe",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    27
		"$(EPOCROOT)/epoc32/release/armv5/udeb/dependency.exe.map",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    28
		"$(EPOCROOT)/epoc32/release/armv5/urel/dependency.exe",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    29
		"$(EPOCROOT)/epoc32/release/armv5/urel/dependency.exe.map",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    30
		"$(EPOCROOT)/epoc32/release/winscw/urel/dependency.exe",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    31
		"$(EPOCROOT)/epoc32/release/winscw/urel/dependency.exe.map",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    32
		"$(EPOCROOT)/epoc32/release/winscw/udeb/dependency.exe",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    33
		"$(EPOCROOT)/epoc32/include/dependency.rsg",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    34
		"$(EPOCROOT)/epoc32/data/z/resource/apps/dependency.rsc",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    35
		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/dependency.rsc",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    36
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/dependency.rsc",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    37
		"$(EPOCROOT)/epoc32/include/main.rsg",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    38
		"$(EPOCROOT)/epoc32/data/z/resource/apps/main.rsc",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    39
		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/main.rsc",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    40
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/main.rsc"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    41
		]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    42
	windowsTargets = [
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    43
		"$(EPOCROOT)/epoc32/release/tools2/rel/dependency.exe",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    44
		"$(EPOCROOT)/epoc32/tools/dependency.exe"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    45
	]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    46
	linuxTargets = [
674
37ee82a83d43 sbs version 2.15.3
Jon Chatten
parents: 625
diff changeset
    47
		"$(EPOCROOT)/epoc32/release/tools2/$(HOSTPLATFORM32_DIR)/rel/dependency",
591
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    48
		"$(EPOCROOT)/epoc32/tools/dependency"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    49
	]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    50
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    51
	# Set general host platform specifics from first test run, but assume Windows initially
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    52
	hostPlatform = "windows"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    53
	hostPlatformTargets = genericTargets + windowsTargets
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    54
	hostPlatformOffset = ""
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    55
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    56
	t.id = "0098a"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    57
	t.name = "baseline_build"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    58
	t.description = "Build a component with source and resource files that are dependent on header files exported in the build"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    59
	t.command = """
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    60
		cp smoke_suite/test_resources/dependencies/src/dependency1.cpp smoke_suite/test_resources/dependencies/dependency.cpp
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    61
		cp smoke_suite/test_resources/dependencies/src/dependency1.rss smoke_suite/test_resources/dependencies/dependency.rss
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    62
		sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""		
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    63
	t.mustnotmatch = [
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    64
		"<warning>Missing dependency detected: .*</warning>"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    65
	]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    66
	t.targets = hostPlatformTargets
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    67
	t.run(hostPlatform)
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    68
	if t.result == AntiTargetSmokeTest.SKIP:
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    69
		hostPlatform = "linux"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    70
		hostPlatformTargets = genericTargets + linuxTargets
674
37ee82a83d43 sbs version 2.15.3
Jon Chatten
parents: 625
diff changeset
    71
		hostPlatformOffset = "$(HOSTPLATFORM32_DIR)/"
591
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    72
		t.targets = hostPlatformTargets
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    73
		t.run(hostPlatform)
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    74
	
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    75
	# Ensure we don't clean up from the previous build in the following two tests
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    76
	t.targets = []
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    77
	
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    78
	# Core expected outcome for the following two tests
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    79
	t.mustmatch = [
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    80
		".*recipe name='compile' target='.*dependency\.o'",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    81
		".*recipe name='win32compile2object' target='.*dependency\.o'",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    82
		".*recipe name='compile2object' target='.*dependency\.o'",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    83
		".*recipe name='resourcecompile' target='.*dependency\.rsc'"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    84
	]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    85
	t.countmatch = [
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    86
		[".*recipe name='compile'", 2],
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    87
		[".*recipe name='win32compile2object'", 2],
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    88
		[".*recipe name='compile2object'", 1],
625
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
    89
		[".*recipe name='resourcecompile", 2]
591
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    90
	]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    91
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    92
	
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    93
	t.id = "0098b"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    94
	t.name ="touched_header_dependencies"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    95
	t.description = "Touch the exported header files and check that only the related source and resource files are re-built"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    96
	t.command = """
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    97
		sleep 1
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    98
		touch $(EPOCROOT)/epoc32/include/dependency.h
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    99
		touch $(EPOCROOT)/epoc32/include/dependency.rh
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   100
		sbs -f- -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   101
	t.run()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   102
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   103
	
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   104
	t.id = "0098c"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   105
	t.name ="redundant_header_dependencies"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   106
	t.description = """
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   107
		Build the component again, but manipulate it so that (a) it no longer has a dependency on the exported header files and
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   108
		(b) the header files have been removed and (c) the header files are no longer exported.  Check that only the related source
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   109
		and resource files are re-built"""
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   110
	t.command = """
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   111
		cp smoke_suite/test_resources/dependencies/src/dependency2.cpp smoke_suite/test_resources/dependencies/dependency.cpp
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   112
		cp smoke_suite/test_resources/dependencies/src/dependency2.rss smoke_suite/test_resources/dependencies/dependency.rss
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   113
		rm -rf $(EPOCROOT)/epoc32/include/dependency.h
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   114
		rm -rf $(EPOCROOT)/epoc32/include/dependency.rh
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   115
		sbs -f- --noexport -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   116
	t.mustnotmatch = []
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   117
	# Note that the resource build does not exhibit a missing dependency as its dependency files are generated in a separate stage where
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   118
	# the target file isn't actually a target of that stage
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   119
	t.mustmatch.extend([
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   120
		"<warning>Missing dependency detected: .*/epoc32/include/dependency.h</warning>"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   121
		])
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   122
	t.warnings = 1
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   123
	t.run()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   124
	
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   125
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   126
	t.id = "0098d"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   127
	t.name ="invalid_dependency_files"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   128
	t.description = "Invalidate dependency files, then make sure we can clean and re-build successfully"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   129
	buildLocation = "$(EPOCROOT)/epoc32/build/" + BldInfFile.outputPathFragment('smoke_suite/test_resources/dependencies/bld.inf') + "/dependency_"
625
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
   130
        # use one long bash command so that we can capture 
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
   131
	# the output in a way that isn't messed up with all the ordering confused.
674
37ee82a83d43 sbs version 2.15.3
Jon Chatten
parents: 625
diff changeset
   132
	t.command = " echo \"making directory for logfile ${SBSLOGFILE}\" ; mkdir -p `dirname ${SBSLOGFILE} 2>/dev/null` ; { sleep 1 ; set -x ; \
625
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
   133
touch smoke_suite/test_resources/dependencies/dependency.cpp; \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
   134
echo INVALIDATE_ARMV5_DEPENDENCY_FILE >> %s/armv5/urel/dependency.o.d ; \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
   135
echo INVALIDATE_WINSCW_DEPENDENCY_FILE >> %s/winscw/urel/dependency.o.d ;\
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
   136
echo INVALIDATE_TOOLS2_DEPENDENCY_FILE >> %s/dependency_exe/tools2/rel/%s/dependency.o.d ;\
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
   137
echo INVALIDATE_RESOURCE_DEPENDENCY_FILE >> %s/dependency__resource_apps.rsc.d ;\
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
   138
sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel ;\
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
   139
sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel clean ;\
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
   140
sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel ; } > ${SBSLOGFILE} 2>&1; grep 'missing separator' ${SBSLOGFILE} " %(buildLocation, buildLocation, buildLocation, hostPlatformOffset, buildLocation)
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
   141
	# We expect an error from the first build due to the deliberate dependency file corruption
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
   142
	t.mustmatch = [
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
   143
		".*dependency.o.d:[0-9]+: \*\*\* missing separator"
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
   144
		]
591
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   145
	t.countmatch = []
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   146
	t.warnings = 0
625
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
   147
	t.errors = 0 
591
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   148
	t.targets = hostPlatformTargets
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   149
	t.run(hostPlatform)
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   150
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   151
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   152
	t.id = "0098e"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   153
	t.name ="no_depend_include"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   154
	t.description = "Invalidate dependency files in order to confirm they aren't processed when --no-depend-include is used"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   155
	buildLocation = "$(EPOCROOT)/epoc32/build/" + BldInfFile.outputPathFragment('smoke_suite/test_resources/dependencies/bld.inf') + "/dependency_"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   156
	t.command = """
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   157
		sleep 1
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   158
		touch smoke_suite/test_resources/dependencies/dependency.cpp
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   159
		echo INVALIDATE_ARMV5_DEPENDENCY_FILE >> """+buildLocation+"""/armv5/urel/dependency.o.d
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   160
		echo INVALIDATE_WINSCW_DEPENDENCY_FILE >> """+buildLocation+"""/winscw/urel/dependency.o.d
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   161
		echo INVALIDATE_TOOLS2_DEPENDENCY_FILE >> """+buildLocation+"""/dependency_exe/tools2/rel/"""+hostPlatformOffset+"""dependency.o.d
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   162
		sbs --no-depend-include -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
625
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
   163
	t.mustmatch = []
591
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   164
	t.errors = 0		
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   165
	t.targets = hostPlatformTargets
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   166
	t.run(hostPlatform)
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   167
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   168
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   169
	t.id = "0098f"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   170
	t.name ="no_depend_generate"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   171
	t.description = "Invalidate and remove dependency files in order to confirm they are neither included nor re-generated when --no-depend-generate is used"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   172
	buildLocation = "$(EPOCROOT)/epoc32/build/" + BldInfFile.outputPathFragment('smoke_suite/test_resources/dependencies/bld.inf') + "/dependency_"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   173
	t.command = """
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   174
		sleep 1
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   175
		touch smoke_suite/test_resources/dependencies/dependency.cpp
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   176
		touch smoke_suite/test_resources/dependencies/main.cpp
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   177
		echo INVALIDATE_ARMV5_DEPENDENCY_FILE >> """+buildLocation+"""/armv5/urel/dependency.o.d
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   178
		echo INVALIDATE_WINSCW_DEPENDENCY_FILE >> """+buildLocation+"""/winscw/urel/dependency.o.d
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   179
		echo INVALIDATE_TOOLS2_DEPENDENCY_FILE >> """+buildLocation+"""/dependency_exe/tools2/rel/"""+hostPlatformOffset+"""dependency.o.d
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   180
		sbs --no-depend-generate -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   181
	t.antitargets = [
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   182
		buildLocation+"/armv5/urel/main.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   183
		buildLocation+"/armv5/udeb/main.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   184
		buildLocation+"/winscw/urel/main.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   185
		buildLocation+"/winscw/udeb/main.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   186
		buildLocation+"/dependency_exe/tools2/rel/"+hostPlatformOffset+"main.o.d"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   187
		]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   188
	t.targets = hostPlatformTargets
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   189
	t.run(hostPlatform)
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   190
	
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   191
	# clean-up
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   192
	os.remove("smoke_suite/test_resources/dependencies/dependency.cpp")
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   193
	os.remove("smoke_suite/test_resources/dependencies/dependency.rss")
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   194
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   195
	t.id = "98"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   196
	t.name = "dependencies"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   197
	t.print_result()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   198
	return t
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   199