sbsv2/raptor/test/smoke_suite/whatcomp.py
author timothy.murphy@nokia.com
Mon, 22 Feb 2010 19:11:51 +0000
branchfix
changeset 242 e083e4a62655
parent 171 083d88a8550e
child 294 660607a4d589
permissions -rw-r--r--
Merge
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
#
171
083d88a8550e Fixing qt_helloworld test id. Fixing copyright notices.
Iain Williamson <iain.williamson@nokia.com>
parents: 170
diff changeset
     2
# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
124
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
137
befd82d9c937 Test fixes for whatcomp test: Deal with slashes correctly. Use Python 264.
raptorbot <raptorbot@systemstesthead.symbian.intra>
parents: 124
diff changeset
    26
	abs_epocroot = os.path.abspath(os.environ["EPOCROOT"])
124
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
137
befd82d9c937 Test fixes for whatcomp test: Deal with slashes correctly. Use Python 264.
raptorbot <raptorbot@systemstesthead.symbian.intra>
parents: 124
diff changeset
    29
	relative_epocroot = os.path.relpath(abs_epocroot.replace("\\","/"),cwd)
124
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
	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
    33
	command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c %s -m ${SBSMAKEFILE} -f ${SBSLOGFILE} what  && " + \
137
befd82d9c937 Test fixes for whatcomp test: Deal with slashes correctly. Use Python 264.
raptorbot <raptorbot@systemstesthead.symbian.intra>
parents: 124
diff changeset
    34
		  "EPOCROOT='%s' sbs_filter --filters FilterWhatComp < ${SBSLOGFILE} &&" % relative_epocroot + \
befd82d9c937 Test fixes for whatcomp test: Deal with slashes correctly. Use Python 264.
raptorbot <raptorbot@systemstesthead.symbian.intra>
parents: 124
diff changeset
    35
		  "EPOCROOT='%s' sbs_filter --filters FilterWhatComp < ${SBSLOGFILE}"  % abs_epocroot
124
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    36
	targets = [
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    37
		]	
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    38
	buildtargets = [
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    39
		]
137
befd82d9c937 Test fixes for whatcomp test: Deal with slashes correctly. Use Python 264.
raptorbot <raptorbot@systemstesthead.symbian.intra>
parents: 124
diff changeset
    40
befd82d9c937 Test fixes for whatcomp test: Deal with slashes correctly. Use Python 264.
raptorbot <raptorbot@systemstesthead.symbian.intra>
parents: 124
diff changeset
    41
	mustmatch_pre = [
124
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",
137
befd82d9c937 Test fixes for whatcomp test: Deal with slashes correctly. Use Python 264.
raptorbot <raptorbot@systemstesthead.symbian.intra>
parents: 124
diff changeset
    43
		".*Chdir .*/smoke_suite/test_resources/simple.*",
124
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
	] 
137
befd82d9c937 Test fixes for whatcomp test: Deal with slashes correctly. Use Python 264.
raptorbot <raptorbot@systemstesthead.symbian.intra>
parents: 124
diff changeset
    49
	
befd82d9c937 Test fixes for whatcomp test: Deal with slashes correctly. Use Python 264.
raptorbot <raptorbot@systemstesthead.symbian.intra>
parents: 124
diff changeset
    50
	if os.sep == '\\':
befd82d9c937 Test fixes for whatcomp test: Deal with slashes correctly. Use Python 264.
raptorbot <raptorbot@systemstesthead.symbian.intra>
parents: 124
diff changeset
    51
		mustmatch = [ i.replace("\\", "\\\\" ).replace("/","\\\\") for i in mustmatch_pre ]
befd82d9c937 Test fixes for whatcomp test: Deal with slashes correctly. Use Python 264.
raptorbot <raptorbot@systemstesthead.symbian.intra>
parents: 124
diff changeset
    52
	else:
befd82d9c937 Test fixes for whatcomp test: Deal with slashes correctly. Use Python 264.
raptorbot <raptorbot@systemstesthead.symbian.intra>
parents: 124
diff changeset
    53
		mustmatch = mustmatch_pre
befd82d9c937 Test fixes for whatcomp test: Deal with slashes correctly. Use Python 264.
raptorbot <raptorbot@systemstesthead.symbian.intra>
parents: 124
diff changeset
    54
124
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    55
	mustnotmatch = [
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    56
	"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
    57
	]
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    58
	warnings = 0
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    59
	
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    60
	t.id = "0106"
170
d1af983e283d Renumbering commandline, pdll_arm and toolchain_macro tests to avoid duplicates.
Iain Williamson <iain.williamson@nokia.com>
parents: 137
diff changeset
    61
	t.name = "whatcomp"
124
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    62
	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
    63
	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
    64
	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
    65
	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
    66
	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
    67
	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
    68
	t.run()
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    69
e898967975af sbs_filter: Fix so that return code is 0 on success (was always 1)
timothy.murphy@nokia.com
parents:
diff changeset
    70
	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
    71
	return t