sbsv2/raptor/test/smoke_suite/whatlog_cache.py
author Richard Taylor <richard.i.taylor@nokia.com>
Wed, 14 Jul 2010 14:50:01 +0100
changeset 616 24e4ef208cca
parent 591 22486c9c7b15
child 625 a1925fb7753a
permissions -rw-r--r--
sbs version 2.14.2
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) 2009-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 SmokeTest
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    18
import os
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    19
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    20
def run():
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    21
	t = SmokeTest()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    22
	t.id = "77"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    23
	t.name = "whatlog_cache"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    24
	t.description = """Test sbsv2cache.py cache file generation using Raptor .whatlog variant output.
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    25
		This is currently a Windows only activity due to CBR tools restrictions."""
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    26
	t.usebash = True
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    27
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    28
	if 'SBS_PYTHON' in os.environ:
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    29
		pythonRun = "$(SBS_PYTHON)"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    30
	else:
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    31
		pythonRun = "$(SBS_HOME)/win32/python264/python.exe"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    32
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    33
	# Build something using the .whatlog variant.  Take the build log and give it to sbsv2cache.py, deducing
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    34
	# the location of the generated cache file from the verbose output.  If generated, dump the cache file to
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    35
	# STDOUT so we can validate the content in this test script.  Clean up when finished.
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    36
	t.command = """sbs -b smoke_suite/test_resources/simple_gui/Bld.inf -f ${SBSLOGFILE} -m ${SBSMAKEFILE} -c armv5.whatlog -c winscw.whatlog
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    37
		CACHEFILE=`%s $SBS_HOME/bin/sbsv2cache.py -v -s -o $EPOCROOT/epoc32/build/abldcache -l $SBSLOGFILE | sed -n \'s#Creating: ##p\'`
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    38
		if [ -n \"${CACHEFILE:+x}\" ]; then
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    39
			cat $CACHEFILE
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    40
		fi
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    41
		rm -r $EPOCROOT/epoc32/build/abldcache""" % pythonRun
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    42
		
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    43
	t.targets = [
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    44
		"$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    45
		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.mbm",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    46
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.mbm",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    47
		"$(EPOCROOT)/epoc32/include/helloworld.rsg",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    48
		"$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.rsc",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    49
		"$(EPOCROOT)/epoc32/data/z/private/10003a3f/apps/helloworld_reg.rsc",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    50
		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.rsc",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    51
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.rsc",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    52
		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/private/10003a3f/apps/helloworld_reg.rsc",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    53
		"$(EPOCROOT)/epoc32/release/winscw/urel/z/private/10003a3f/apps/helloworld_reg.rsc",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    54
		"$(EPOCROOT)/epoc32/release/armv5/udeb/helloworld.exe",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    55
		"$(EPOCROOT)/epoc32/release/armv5/udeb/helloworld.exe.map",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    56
		"$(EPOCROOT)/epoc32/release/winscw/udeb/helloworld.exe",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    57
		"$(EPOCROOT)/epoc32/release/armv5/urel/helloworld.exe",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    58
		"$(EPOCROOT)/epoc32/release/armv5/urel/helloworld.exe.map",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    59
		"$(EPOCROOT)/epoc32/release/winscw/urel/helloworld.exe",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    60
		"$(EPOCROOT)/epoc32/release/winscw/urel/helloworld.exe.map"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    61
		]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    62
	t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    63
		"helloworld_exe/helloworld.mbm_bmconvcommands",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    64
		"helloworld_exe/helloworld_HelloWorld_sc.rpp",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    65
		"helloworld_exe/helloworld_HelloWorld_sc.rpp.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    66
		"helloworld_exe/armv5/udeb/HelloWorld_Application.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    67
		"helloworld_exe/armv5/udeb/HelloWorld_Application.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    68
		"helloworld_exe/armv5/udeb/HelloWorld_AppUi.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    69
		"helloworld_exe/armv5/udeb/HelloWorld_AppUi.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    70
		"helloworld_exe/armv5/udeb/HelloWorld_AppView.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    71
		"helloworld_exe/armv5/udeb/HelloWorld_AppView.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    72
		"helloworld_exe/armv5/udeb/HelloWorld_Document.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    73
		"helloworld_exe/armv5/udeb/HelloWorld_Document.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    74
		"helloworld_exe/armv5/udeb/HelloWorld_Main.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    75
		"helloworld_exe/armv5/udeb/HelloWorld_Main.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    76
		"helloworld_exe/armv5/udeb/helloworld_udeb_objects.via",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    77
		"helloworld_exe/armv5/urel/HelloWorld_Application.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    78
		"helloworld_exe/armv5/urel/HelloWorld_Application.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    79
		"helloworld_exe/armv5/urel/HelloWorld_AppUi.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    80
		"helloworld_exe/armv5/urel/HelloWorld_AppUi.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    81
		"helloworld_exe/armv5/urel/HelloWorld_AppView.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    82
		"helloworld_exe/armv5/urel/HelloWorld_AppView.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    83
		"helloworld_exe/armv5/urel/HelloWorld_Document.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    84
		"helloworld_exe/armv5/urel/HelloWorld_Document.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    85
		"helloworld_exe/armv5/urel/HelloWorld_Main.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    86
		"helloworld_exe/armv5/urel/HelloWorld_Main.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    87
		"helloworld_exe/armv5/urel/helloworld_urel_objects.via",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    88
		"helloworld_exe/winscw/udeb/helloworld.UID.CPP",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    89
		"helloworld_exe/winscw/udeb/HelloWorld_Application.dep",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    90
		"helloworld_exe/winscw/udeb/HelloWorld_Application.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    91
		"helloworld_exe/winscw/udeb/HelloWorld_Application.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    92
		"helloworld_exe/winscw/udeb/HelloWorld_AppUi.dep",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    93
		"helloworld_exe/winscw/udeb/HelloWorld_AppUi.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    94
		"helloworld_exe/winscw/udeb/HelloWorld_AppUi.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    95
		"helloworld_exe/winscw/udeb/HelloWorld_AppView.dep",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    96
		"helloworld_exe/winscw/udeb/HelloWorld_AppView.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    97
		"helloworld_exe/winscw/udeb/HelloWorld_AppView.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    98
		"helloworld_exe/winscw/udeb/HelloWorld_Document.dep",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    99
		"helloworld_exe/winscw/udeb/HelloWorld_Document.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   100
		"helloworld_exe/winscw/udeb/HelloWorld_Document.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   101
		"helloworld_exe/winscw/udeb/HelloWorld_Main.dep",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   102
		"helloworld_exe/winscw/udeb/HelloWorld_Main.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   103
		"helloworld_exe/winscw/udeb/HelloWorld_Main.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   104
		"helloworld_exe/winscw/udeb/helloworld_UID_.dep",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   105
		"helloworld_exe/winscw/udeb/helloworld_UID_.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   106
		"helloworld_exe/winscw/udeb/helloworld_UID_.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   107
		"helloworld_exe/winscw/urel/helloworld.UID.CPP",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   108
		"helloworld_exe/winscw/urel/HelloWorld_Application.dep",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   109
		"helloworld_exe/winscw/urel/HelloWorld_Application.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   110
		"helloworld_exe/winscw/urel/HelloWorld_Application.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   111
		"helloworld_exe/winscw/urel/HelloWorld_AppUi.dep",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   112
		"helloworld_exe/winscw/urel/HelloWorld_AppUi.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   113
		"helloworld_exe/winscw/urel/HelloWorld_AppUi.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   114
		"helloworld_exe/winscw/urel/HelloWorld_AppView.dep",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   115
		"helloworld_exe/winscw/urel/HelloWorld_AppView.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   116
		"helloworld_exe/winscw/urel/HelloWorld_AppView.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   117
		"helloworld_exe/winscw/urel/HelloWorld_Document.dep",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   118
		"helloworld_exe/winscw/urel/HelloWorld_Document.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   119
		"helloworld_exe/winscw/urel/HelloWorld_Document.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   120
		"helloworld_exe/winscw/urel/HelloWorld_Main.dep",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   121
		"helloworld_exe/winscw/urel/HelloWorld_Main.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   122
		"helloworld_exe/winscw/urel/HelloWorld_Main.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   123
		"helloworld_exe/winscw/urel/helloworld_UID_.dep",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   124
		"helloworld_exe/winscw/urel/helloworld_UID_.o",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   125
		"helloworld_exe/winscw/urel/helloworld_UID_.o.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   126
		"helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   127
	])
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   128
	t.countmatch = [
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   129
		["\$self->{abldcache}->{.*\\\\test\\\\smoke_suite\\\\test_resources\\\\simple_gui target (armv5|winscw) (udeb|urel) -what\'} =", 4],
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   130
		[".*\'.*\\\\\\\\epoc32\\\\\\\\data\\\\\\\\z\\\\\\\\private\\\\\\\\10003a3f\\\\\\\\apps\\\\\\\\helloworld_reg.rsc\'", 4],
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   131
		[".*\'.*\\\\\\\\epoc32\\\\\\\\data\\\\\\\\z\\\\\\\\resource\\\\\\\\apps\\\\\\\\helloworld.mbm\'", 4],
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   132
		[".*\'.*\\\\\\\\epoc32\\\\\\\\data\\\\\\\\z\\\\\\\\resource\\\\\\\\apps\\\\\\\\helloworld.rsc\'", 4],
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   133
		[".*\'.*\\\\\\\\epoc32\\\\\\\\include\\\\\\\\helloworld.rsg\'", 4],
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   134
		[".*\'.*\\\\\\\\epoc32\\\\\\\\release\\\\\\\\(armv5|winscw)\\\\\\\\(udeb|urel)\\\\\\\\helloworld.exe\'",4],
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   135
		[".*\'.*\\\\\\\\epoc32\\\\\\\\release\\\\\\\\(armv5|winscw)\\\\\\\\(udeb|urel)\\\\\\\\helloworld.exe.map\'", 3],
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   136
		[".*\'.*\\\\\\\\epoc32\\\\\\\\release\\\\\\\\winscw\\\\\\\\(udeb|urel)\\\\\\\\z\\\\\\\\private\\\\\\\\10003a3f\\\\\\\\apps\\\\\\\\helloworld_reg.rsc\'", 2],
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   137
		[".*\'.*\\\\\\\\epoc32\\\\\\\\release\\\\\\\\winscw\\\\\\\\(udeb|urel)\\\\\\\\z\\\\\\\\resource\\\\\\\\apps\\\\\\\\helloworld.mbm\'", 2],
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   138
		[".*\'.*\\\\\\\\epoc32\\\\\\\\release\\\\\\\\winscw\\\\\\\\(udeb|urel)\\\\\\\\z\\\\\\\\resource\\\\\\\\apps\\\\\\\\helloworld.rsc\'", 2],
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   139
		["\$self->{abldcache}->{\'plats\'} =", 1],
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   140
		[".*\'ARMV5\'", 1],
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   141
		[".*\'WINSCW\'", 1]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   142
	]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   143
	t.run("windows")
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   144
	return t