sbsv2/raptor/test/smoke_suite/gccxml.py
author srilekhas
Fri, 08 Oct 2010 21:02:28 +0100
changeset 650 8f038057ffa5
parent 625 a1925fb7753a
permissions -rw-r--r--
Added in fix to Bug 2149
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 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, AntiTargetSmokeTest
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    18
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    19
def run():
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    20
	result = SmokeTest.PASS
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    21
	
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    22
	t = SmokeTest()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    23
	t.id = "0057a"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    24
	t.name = "gccxml"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    25
	t.usebash = True
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    26
	t.command = "sbs -b smoke_suite/test_resources/simple_gui/bld.inf " + \
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    27
			"-c gccxml_urel -m ${SBSMAKEFILE} -f ${SBSLOGFILE} && " + \
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    28
			"grep -o 'gcc.*-fpermissive' ${SBSLOGFILE}"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    29
	t.targets = [
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    30
		"$(EPOCROOT)/epoc32/release/gccxml/includeheaders.txt",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    31
		"$(EPOCROOT)/epoc32/release/gccxml/urel/helloworldexe.gxp"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    32
		]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    33
	t.addbuildtargets('smoke_suite/test_resources/simple_gui/bld.inf', [
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    34
		"helloworld_exe/gccxml/HelloWorld.mmp.xml",
625
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
    35
		"helloworld_exe/helloworld_HelloWorld.rsc.d",
591
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    36
		"helloworld_exe/gccxml/HelloWorld.rss.rfi",
625
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
    37
		"helloworld_reg_exe/helloworld_reg_HelloWorld_reg.rsc.d",
591
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    38
		"helloworld_exe/gccxml/HelloWorld_reg.rss.rfi",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    39
		"helloworld_exe/gccxml/urel/HelloWorld_Application.xml.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    40
		"helloworld_exe/gccxml/urel/HelloWorld_Application.xml",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    41
		"helloworld_exe/gccxml/urel/HelloWorld_AppUi.xml.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    42
		"helloworld_exe/gccxml/urel/HelloWorld_AppUi.xml",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    43
		"helloworld_exe/gccxml/urel/HelloWorld_AppView.xml.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    44
		"helloworld_exe/gccxml/urel/HelloWorld_AppView.xml",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    45
		"helloworld_exe/gccxml/urel/HelloWorld_Document.xml.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    46
		"helloworld_exe/gccxml/urel/HelloWorld_Document.xml",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    47
		"helloworld_exe/gccxml/urel/HelloWorld_Main.xml.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    48
		"helloworld_exe/gccxml/urel/HelloWorld_Main.xml"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    49
	])
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    50
	t.mustmatch = [
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    51
		".*gcc.*-fpermissive.*"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    52
	]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    53
	# Windows-only until formal delivery of a Linux version of gccxml_cc1plus
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    54
	t.run("windows")
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    55
	if t.result == SmokeTest.FAIL:
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    56
		result = SmokeTest.FAIL
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    57
	elif t.result == SmokeTest.SKIP:
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    58
		return t
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    59
	
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    60
	
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    61
	t = AntiTargetSmokeTest()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    62
	t.id = "0057b"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    63
	t.name = "gccxml_reallyclean"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    64
	t.command = "sbs -b smoke_suite/test_resources/simple_gui/bld.inf " + \
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    65
			"-c gccxml_urel REALLYCLEAN"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    66
	t.antitargets = ["$(EPOCROOT)/epoc32/release/gccxml/urel/helloworldexe.gxp"]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    67
	t.addbuildantitargets('smoke_suite/test_resources/simple_gui/bld.inf', [
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    68
		"helloworld_exe/gccxml/HelloWorld.mmp.xml",
625
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
    69
		"helloworld_exe/helloworld_HelloWorld.rsc.d",
591
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    70
		"helloworld_exe/gccxml/HelloWorld.rss.rfi",
625
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents: 591
diff changeset
    71
		"helloworld_reg_exe/helloworld_reg_HelloWorld_reg.rsc.d",
591
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    72
		"helloworld_exe/gccxml/HelloWorld_reg.rss.rfi",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    73
		"helloworld_exe/gccxml/urel/HelloWorld_Application.xml.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    74
		"helloworld_exe/gccxml/urel/HelloWorld_Application.xml",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    75
		"helloworld_exe/gccxml/urel/HelloWorld_AppUi.xml.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    76
		"helloworld_exe/gccxml/urel/HelloWorld_AppUi.xml",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    77
		"helloworld_exe/gccxml/urel/HelloWorld_AppView.xml.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    78
		"helloworld_exe/gccxml/urel/HelloWorld_AppView.xml",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    79
		"helloworld_exe/gccxml/urel/HelloWorld_Document.xml.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    80
		"helloworld_exe/gccxml/urel/HelloWorld_Document.xml",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    81
		"helloworld_exe/gccxml/urel/HelloWorld_Main.xml.d",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    82
		"helloworld_exe/gccxml/urel/HelloWorld_Main.xml"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    83
	])
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    84
	t.run("windows")
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    85
	if t.result == SmokeTest.FAIL:
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    86
		result = SmokeTest.FAIL
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    87
		
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    88
		
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    89
	t = SmokeTest()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    90
	t.id = "0057c"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    91
	t.name = "gccxml_var2"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    92
	t.command = "sbs -b smoke_suite/test_resources/simple_gui/BldVar2.inf " + \
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    93
			"-c gccxml_urel -f -"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    94
	
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    95
	# Don't allow -m or -f to be appended
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    96
	t.logfileOption = lambda :""
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    97
	t.makefileOption = lambda :""
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    98
	
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    99
	t.mustmatch = [".*__KERNEL_MODE__.*"]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   100
	t.errors = 1 # not really VAR2 code, so it wont build cleanly
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   101
	t.returncode = 1
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   102
	t.run("windows")
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   103
	if t.result == SmokeTest.FAIL:
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   104
		result = SmokeTest.FAIL
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   105
		
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   106
		
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   107
	t = SmokeTest()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   108
	t.id = "0057d"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   109
	t.name = "gccxml_stdcpp"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   110
	t.command = "sbs -b smoke_suite/test_resources/simple_gui/Bld_stdcpp.inf " + \
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   111
			"-c gccxml_urel -f -"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   112
	
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   113
	# Don't allow -m or -f to be appended
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   114
	t.logfileOption = lambda :""
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   115
	t.makefileOption = lambda :""
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   116
	
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   117
	t.mustmatch = [".*__SYMBIAN_STDCPP_SUPPORT__.*"]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   118
	t.errors = 0 # reset after previous run
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   119
	t.run("windows")
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   120
	if t.result == SmokeTest.FAIL:
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   121
		result = SmokeTest.FAIL
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   122
	
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   123
		
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   124
	t.id = "57"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   125
	t.name = "gccxml"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   126
	t.result = result
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   127
	t.print_result()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   128
	return t
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   129