sbsv2/raptor/test/smoke_suite/exe_armv5.py
author raptorbot <raptorbot@systemstesthead.symbian.intra>
Mon, 15 Feb 2010 13:33:43 +0000
branchfix
changeset 209 604f2aceff59
parent 205 ce7b587b436c
permissions -rw-r--r--
test: make sure '\' characters in a string are escaped to \\ so that the regexp works
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     1
#
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     2
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
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
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    18
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    19
def run():
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    20
	t = SmokeTest()
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    21
	t.usebash = True
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    22
	result = SmokeTest.PASS
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    23
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    24
	description = """This test is testing 2 states of keywords, DEBUGGABLE on its own and with DEBUGGABLE_UDEBONLY together; in their mmp's
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    25
			make a new mmp change the target so that it generates another exe, and search together with that exe name when testing second test"""
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    26
	command = "sbs -b smoke_suite/test_resources/simple/bld.inf -b smoke_suite/test_resources/simple/debuggable_bld.inf -c %s -m ${SBSMAKEFILE} -f ${SBSLOGFILE} && " + \
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    27
			"grep -i '.*elf2e32.*--debuggable.*' ${SBSLOGFILE};"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    28
	targets = [
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    29
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    30
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe.map",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    31
		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    32
		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe.map",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    33
		"$(EPOCROOT)/epoc32/release/armv5/udeb/debuggable.exe",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    34
		"$(EPOCROOT)/epoc32/release/armv5/urel/debuggable.exe",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    35
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe.sym",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    36
		"$(EPOCROOT)/epoc32/release/armv5/udeb/debuggable.exe.sym",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    37
		"$(EPOCROOT)/epoc32/release/armv5/udeb/debuggable.exe.map",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    38
		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe.sym",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    39
		"$(EPOCROOT)/epoc32/release/armv5/urel/debuggable.exe.sym",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    40
		"$(EPOCROOT)/epoc32/release/armv5/urel/debuggable.exe.map"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    41
		]	
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    42
	buildtargets = [
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    43
		"test_/armv5/udeb/test.o",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    44
		"test_/armv5/urel/test.o",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    45
		"test_/armv5/udeb/test.o.d",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    46
		"test_/armv5/udeb/test3.o.d",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    47
		"test_/armv5/udeb/test4.o.d",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    48
		"test_/armv5/udeb/test5.o.d",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    49
		"test_/armv5/udeb/test1.o.d",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    50
		"test_/armv5/udeb/test6.o.d",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    51
		"test_/armv5/udeb/test2.o.d",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    52
		"test_/armv5/udeb/test3.o",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    53
		"test_/armv5/udeb/test4.o",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    54
		"test_/armv5/udeb/test5.o",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    55
		"test_/armv5/udeb/test1.o",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    56
		"test_/armv5/udeb/test6.o",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    57
		"test_/armv5/udeb/test2.o",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    58
		"test_/armv5/urel/test.o.d",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    59
		"test_/armv5/urel/test3.o.d",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    60
		"test_/armv5/urel/test4.o.d",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    61
		"test_/armv5/urel/test5.o.d",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    62
		"test_/armv5/urel/test1.o.d",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    63
		"test_/armv5/urel/test6.o.d",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    64
		"test_/armv5/urel/test2.o.d",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    65
		"test_/armv5/urel/test3.o",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    66
		"test_/armv5/urel/test4.o",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    67
		"test_/armv5/urel/test5.o",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    68
		"test_/armv5/urel/test1.o",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    69
		"test_/armv5/urel/test6.o",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    70
		"test_/armv5/urel/test2.o",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    71
		"test_/armv5/udeb/test_udeb_objects.via",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    72
		"test_/armv5/urel/test_urel_objects.via"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    73
		]
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    74
	mustmatch = [
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    75
		".*elf2e32.*urel.*test.exe.*--debuggable.*",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    76
		".*elf2e32.*udeb.*test.exe.*--debuggable.*",
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    77
		".*elf2e32.*udeb.*debuggable.exe.*--debuggable.*"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    78
	]
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    79
	mustnotmatch = [
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    80
		".*elf2e32.*urel.*debuggable.exe.*--debuggable.*"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    81
	]
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    82
	warnings = 1
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    83
	
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    84
	t.id = "0001a"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    85
	t.name = "exe_armv5_rvct"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    86
	t.description = description
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    87
	t.command = command % "armv5"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    88
	t.targets = targets
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    89
	t.addbuildtargets("smoke_suite/test_resources/simple/bld.inf", buildtargets)
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    90
	t.mustmatch = mustmatch
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    91
	t.mustnotmatch = mustnotmatch
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    92
	t.warnings = warnings
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    93
	t.run()
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    94
	if t.result == SmokeTest.FAIL:
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    95
		result = SmokeTest.FAIL
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    96
		
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    97
	t.id = "0001b"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    98
	t.name = "exe_armv5_clean"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    99
	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 clean"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   100
	t.targets = []
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   101
	t.mustmatch = []
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   102
	t.mustnotmatch = []
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   103
	t.warnings = 0
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   104
	t.run()	
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   105
	if t.result == SmokeTest.FAIL:
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   106
		result = SmokeTest.FAIL	
205
ce7b587b436c fix: filterwhatcomp and filtercheckcomp - correctly strip absolute directory and replace with EPOCROOT on windows.
timothy.murphy@nokia.com
parents: 199
diff changeset
   107
	
ce7b587b436c fix: filterwhatcomp and filtercheckcomp - correctly strip absolute directory and replace with EPOCROOT on windows.
timothy.murphy@nokia.com
parents: 199
diff changeset
   108
3
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   109
	t.id = "0001c"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   110
	t.name = "exe_armv5_gcce"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   111
	t.command = command % "gcce_armv5"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   112
	t.targets = targets
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   113
	t.addbuildtargets("smoke_suite/test_resources/simple/bld.inf", buildtargets)
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   114
	t.mustmatch = mustmatch
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   115
	t.mustnotmatch = mustnotmatch
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   116
	t.warnings = warnings
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   117
	t.run()
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   118
	if t.result == SmokeTest.FAIL:
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   119
		result = SmokeTest.FAIL	
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   120
209
604f2aceff59 test: make sure '\' characters in a string are escaped to \\ so that the regexp works
raptorbot <raptorbot@systemstesthead.symbian.intra>
parents: 205
diff changeset
   121
604f2aceff59 test: make sure '\' characters in a string are escaped to \\ so that the regexp works
raptorbot <raptorbot@systemstesthead.symbian.intra>
parents: 205
diff changeset
   122
	# Test for the Check Filter to ensure that it reports 
604f2aceff59 test: make sure '\' characters in a string are escaped to \\ so that the regexp works
raptorbot <raptorbot@systemstesthead.symbian.intra>
parents: 205
diff changeset
   123
	# missing files properly when used from sbs_filter.py:
205
ce7b587b436c fix: filterwhatcomp and filtercheckcomp - correctly strip absolute directory and replace with EPOCROOT on windows.
timothy.murphy@nokia.com
parents: 199
diff changeset
   124
	import os
ce7b587b436c fix: filterwhatcomp and filtercheckcomp - correctly strip absolute directory and replace with EPOCROOT on windows.
timothy.murphy@nokia.com
parents: 199
diff changeset
   125
	abs_epocroot = os.path.abspath(os.environ["EPOCROOT"])
199
3776a92b44bb Tests cor check and whatTests cor check and what
timothy.murphy@nokia.com
parents: 3
diff changeset
   126
	t.id = "0001d"
3776a92b44bb Tests cor check and whatTests cor check and what
timothy.murphy@nokia.com
parents: 3
diff changeset
   127
	t.command = "rm $(EPOCROOT)/epoc32/release/armv5/udeb/test.exe.map; sbs_filter  --filters=FilterCheck < ${SBSLOGFILE}"
3776a92b44bb Tests cor check and whatTests cor check and what
timothy.murphy@nokia.com
parents: 3
diff changeset
   128
	t.targets = []
209
604f2aceff59 test: make sure '\' characters in a string are escaped to \\ so that the regexp works
raptorbot <raptorbot@systemstesthead.symbian.intra>
parents: 205
diff changeset
   129
	t.mustmatch = ["MISSING:[ 	]+" + abs_epocroot.replace("\\","\\\\") + ".epoc32.release.armv5.udeb.test\.exe\.map.*"]
199
3776a92b44bb Tests cor check and whatTests cor check and what
timothy.murphy@nokia.com
parents: 3
diff changeset
   130
	t.mustnotmatch = []
3776a92b44bb Tests cor check and whatTests cor check and what
timothy.murphy@nokia.com
parents: 3
diff changeset
   131
	t.warnings = 1
3776a92b44bb Tests cor check and whatTests cor check and what
timothy.murphy@nokia.com
parents: 3
diff changeset
   132
	t.returncode = 2
3776a92b44bb Tests cor check and whatTests cor check and what
timothy.murphy@nokia.com
parents: 3
diff changeset
   133
	t.run()
3776a92b44bb Tests cor check and whatTests cor check and what
timothy.murphy@nokia.com
parents: 3
diff changeset
   134
3776a92b44bb Tests cor check and whatTests cor check and what
timothy.murphy@nokia.com
parents: 3
diff changeset
   135
	if t.result == SmokeTest.FAIL:
3776a92b44bb Tests cor check and whatTests cor check and what
timothy.murphy@nokia.com
parents: 3
diff changeset
   136
		result = SmokeTest.FAIL	
3
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   137
	t.id = "1"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   138
	t.name = "exe_armv5"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   139
	t.result = result
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   140
	t.print_result()
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
   141
	return t