sbsv2/raptor/test/smoke_suite/whatcomp.py
author raptorbot <raptorbot@systemstesthead.symbian.intra>
Mon, 18 Jan 2010 17:03:32 +0000
branchwip
changeset 132 2022a4abb126
parent 124 e898967975af
child 137 befd82d9c937
permissions -rw-r--r--
filter and wilterwhatcomp cosmetic (style) fixes.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
124
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
     1
#
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
     2
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
     3
# All rights reserved.
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
     4
# This component and the accompanying materials are made available
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
     5
# under the terms of the License "Eclipse Public License v1.0"
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
     6
# which accompanies this distribution, and is available
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
     8
#
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
     9
# Initial Contributors:
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    10
# Nokia Corporation - initial contribution.
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    11
#
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    12
# Contributors:
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    13
#
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    14
# Description: 
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    15
#
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    16
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    17
from raptor_tests import SmokeTest
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    18
import generic_path
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    19
import os
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    20
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    21
def run():
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    22
	t = SmokeTest()
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    23
	t.usebash = True
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    24
	result = SmokeTest.PASS
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    25
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    26
	abs_epocroot = os.path.abspath(os.environ["EPOCROOT"]).replace("\\","/")
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    27
	cwd = os.getcwd().replace("\\","/")
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    28
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    29
	relative_epocroot = os.path.relpath(abs_epocroot,cwd).replace("\\","/")
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    30
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    31
	
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    32
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    33
	description = """This tests the whatcomp filter.  As a byproduct it uses (and thus smoke-tests) sbs_filter.py"""
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    34
	command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c %s -m ${SBSMAKEFILE} -f ${SBSLOGFILE} what  && " + \
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    35
		  "EPOCROOT=%s sbs_filter --filters FilterWhatComp < ${SBSLOGFILE} &&" % relative_epocroot + \
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    36
		  "EPOCROOT=%s sbs_filter --filters FilterWhatComp < ${SBSLOGFILE}"  % abs_epocroot
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    37
	targets = [
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    38
		]	
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    39
	buildtargets = [
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    40
		]
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    41
	mustmatch = [
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    42
		"-- abld -w",
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    43
		"Chdir .*/smoke_suite/test_resources/simple",
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    44
		relative_epocroot + "/epoc32/release/armv5/urel/test.exe",
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    45
		relative_epocroot + "/epoc32/release/armv5/urel/test.exe.map",
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    46
		abs_epocroot + "/epoc32/release/armv5/urel/test.exe",
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    47
		abs_epocroot + "/epoc32/release/armv5/urel/test.exe.map",
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    48
	] 
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    49
	mustnotmatch = [
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    50
	"error: no (CHECK|WHAT) information found"
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    51
	]
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    52
	warnings = 0
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    53
	
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    54
	t.id = "0106"
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    55
	t.name = "filter_whatcomp_sbs_filter"
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    56
	t.description = description
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    57
	t.command = command % "arm.v5.urel.gcce4_4_1"
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    58
	t.targets = targets
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    59
	t.mustmatch = mustmatch
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    60
	t.mustnotmatch = mustnotmatch
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    61
	t.warnings = warnings
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    62
	t.run()
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    63
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    64
	t.print_result()
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    65
	return t