sbsv2/raptor/test/smoke_suite/toolchain_macros.py
author Daniel Jacobs <daniel.jacobs@nokia.com>
Thu, 01 Apr 2010 15:50:33 +0100
branchwip
changeset 450 63f3bc391c14
parent 171 083d88a8550e
permissions -rw-r--r--
Fix mismatches in test names vs. file names.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
23
e9dc34adfa0e Add in the toolchain macros file.
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).
23
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
     3
# All rights reserved.
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
     4
# This component and the accompanying materials are made available
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
     5
# under the terms of the License "Eclipse Public License v1.0"
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
     6
# which accompanies this distribution, and is available
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
     8
#
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
     9
# Initial Contributors:
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    10
# Nokia Corporation - initial contribution.
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    11
#
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    12
# Contributors:
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    13
#
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    14
# Description: 
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    15
#
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    16
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    17
from raptor_tests import SmokeTest
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    18
import string
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    19
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    20
def run():
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    21
	t = SmokeTest()
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    22
	t.description = "Check that ARM toolchain specific macros are used in both metadata and source processing."
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    23
	t.warnings = -1
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    24
	
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    25
	toolchains = {
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    26
				'rvct2_2':   ['ARMCC', 'ARMCC_2', 'ARMCC_2_2', '__ARMCC__', '__ARMCC_2__',  '__ARMCC_2_2__'],
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    27
				'rvct3_1':   ['ARMCC', 'ARMCC_3', 'ARMCC_3_1', '__ARMCC__', '__ARMCC_3__' , '__ARMCC_3_1__'],
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    28
				'rvct4_0':   ['ARMCC', 'ARMCC_4', 'ARMCC_4_0', '__ARMCC__', '__ARMCC_4__' , '__ARMCC_4_0__'],
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    29
				'gcce4_3_2': ['GCCE',  'GCCE_4',  'GCCE_4_3',  '__GCCE__',  '__GCCE_4__' ,  '__GCCE_4_3__'],
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    30
				'gcce4_3_3': ['GCCE', 'GCCE_4', 'GCCE_4_3', '__GCCE__', '__GCCE_4__' , '__GCCE_4_3__'],
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    31
				'gcce4_4_1': ['GCCE', 'GCCE_4', 'GCCE_4_4', '__GCCE__', '__GCCE_4__' , '__GCCE_4_4__']
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    32
				}
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    33
	
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    34
	rootname = "toolchain_macros_armv5_%s_%s"
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    35
	rootcommand = "sbs -b smoke_suite/test_resources/toolchain_macros/bld.inf -c arm.v5.urel."
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    36
	macromatch = ": #warning( directive:)? %s(</warning>)?$"
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    37
	
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    38
	count = 0	
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    39
	for toolchain in sorted(toolchains.keys()):
170
d1af983e283d Renumbering commandline, pdll_arm and toolchain_macro tests to avoid duplicates.
Iain Williamson <iain.williamson@nokia.com>
parents: 25
diff changeset
    40
		t.id = "0095" + string.ascii_lowercase[count]
23
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    41
		t.name = rootname % (toolchain, "clean")
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    42
		t.command = rootcommand + toolchain + " clean"
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    43
		t.mustmatch_singleline = []
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    44
		t.run()
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    45
		count += 1
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    46
		
170
d1af983e283d Renumbering commandline, pdll_arm and toolchain_macro tests to avoid duplicates.
Iain Williamson <iain.williamson@nokia.com>
parents: 25
diff changeset
    47
		t.id = "0095" + string.ascii_lowercase[count]
23
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    48
		t.name = rootname % (toolchain, "build")
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    49
		t.command = rootcommand + toolchain
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    50
		mustmatch = []	
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    51
		for macro in toolchains[toolchain]:
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    52
			mustmatch.append(macromatch % macro)
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    53
		t.mustmatch_singleline = mustmatch
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    54
		t.run()
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    55
		count += 1
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    56
170
d1af983e283d Renumbering commandline, pdll_arm and toolchain_macro tests to avoid duplicates.
Iain Williamson <iain.williamson@nokia.com>
parents: 25
diff changeset
    57
	t.id = "95"
23
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    58
	t.name = "toolchain_macros"
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    59
	t.print_result()
e9dc34adfa0e Add in the toolchain macros file.
timothy.murphy@nokia.com
parents:
diff changeset
    60
	return t