sbsv2/raptor/test/smoke_suite/temtest.py
author Zheng Shen <zheng.shen@nokia.com>
Tue, 26 Oct 2010 11:12:31 +0800
changeset 654 7c11c3d8d025
parent 591 22486c9c7b15
permissions -rw-r--r--
romtools 13.2.0.1
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-2010 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, CheckWhatSmokeTest
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
	t = SmokeTest()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    22
	t.id = "0018a"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    23
	t.name = "temclean"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    24
	t.command = "sbs -b smoke_suite/test_resources/tem/bldclean.inf -c armv5 CLEAN"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    25
	t.targets = [
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    26
		"$(EPOCROOT)/epoc32/raptor_smoketest_tem_succeeded",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    27
		"$(EPOCROOT)/epoc32/raptor_smoketest_tem_failed"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    28
		]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    29
	t.missing = 2
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    30
	t.warnings = 1
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    31
	t.returncode = 0
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    32
	t.run()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    33
	if t.result == SmokeTest.FAIL:
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    34
		result = SmokeTest.FAIL
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    35
	
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    36
	
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    37
	t.id = "0018b"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    38
	t.name = "temtest"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    39
	t.command = "sbs -b smoke_suite/test_resources/tem/bld.inf -c armv5"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    40
	t.targets = [
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    41
		"$(EPOCROOT)/epoc32/raptor_smoketest_tem_succeeded"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    42
		]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    43
	t.warnings = 2
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    44
	t.missing = 0
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    45
	t.returncode = 1
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    46
	t.mustmatch = [ "repeated call to TEM with same values.* Stop\." ]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    47
	t.run()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    48
	if t.result == SmokeTest.FAIL:
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    49
		result = SmokeTest.FAIL
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    50
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    51
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    52
	t.id = "0018c"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    53
	t.name = "temclean2"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    54
	t.command = "sbs -b smoke_suite/test_resources/tem/bldclean.inf -c armv5 CLEAN"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    55
	t.targets = [
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    56
		"$(EPOCROOT)/epoc32/raptor_smoketest_tem_succeeded",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    57
		"$(EPOCROOT)/epoc32/raptor_smoketest_tem_failed"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    58
		]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    59
	t.missing = 2
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    60
	t.warnings = 1
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    61
	t.returncode = 0
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    62
	t.mustmatch = []
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    63
	t.run()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    64
	if t.result == SmokeTest.FAIL:
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    65
		result = SmokeTest.FAIL
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    66
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    67
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    68
	t.id = "0018d"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    69
	t.name = "badtem"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    70
	t.command = "sbs -b smoke_suite/test_resources/tem/bad_bld.inf -c armv5"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    71
	t.targets = [
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    72
		"$(EPOCROOT)/epoc32/raptor_smoketest_tem_failed"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    73
		]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    74
	t.warnings = 3
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    75
	t.missing = 0
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    76
	t.returncode = 1
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    77
	t.run()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    78
	if t.result == SmokeTest.FAIL:
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    79
		result = SmokeTest.FAIL
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    80
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    81
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    82
	t.id = "0018e"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    83
	t.name = "temclean3"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    84
	t.command = "sbs -b smoke_suite/test_resources/tem/bldclean.inf -c armv5 CLEAN"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    85
	t.targets = [
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    86
		"$(EPOCROOT)/epoc32/raptor_smoketest_tem_succeeded",
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    87
		"$(EPOCROOT)/epoc32/raptor_smoketest_tem_failed"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    88
		]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    89
	t.missing = 2
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    90
	t.warnings = 1
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    91
	t.returncode = 0
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    92
	t.run()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    93
	if t.result == SmokeTest.FAIL:
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    94
		result = SmokeTest.FAIL
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    95
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    96
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    97
	t = CheckWhatSmokeTest()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    98
	t.id = "0018f"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    99
	t.name = "temwhat"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   100
	t.command = "sbs -b smoke_suite/test_resources/simple_extension/bld.inf --what"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   101
	t.output_expected_only_once = True	
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   102
	t.stdout = [
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   103
		# exports
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   104
		'$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/clean.mk',
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   105
		'$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/clean.meta',
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   106
		'$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/build.mk',
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   107
		'$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/build.meta',
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   108
		# release tree built
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   109
		'$(EPOCROOT)/epoc32/release/armv5/udeb/simple_extension.txt',
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   110
		'$(EPOCROOT)/epoc32/release/armv5/urel/simple_extension.txt',
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   111
		'$(EPOCROOT)/epoc32/release/winscw/udeb/simple_extension.txt',
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   112
		'$(EPOCROOT)/epoc32/release/winscw/urel/simple_extension.txt'
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   113
	]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   114
	t.run()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   115
	if t.result == SmokeTest.FAIL:
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   116
		result = SmokeTest.FAIL
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   117
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   118
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   119
	t = SmokeTest()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   120
	t.id = "0018g"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   121
	t.name = "badtem2"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   122
	t.command = "sbs -b smoke_suite/test_resources/tem/bad2_bld.inf -c armv5"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   123
	t.targets = [
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   124
		"$(EPOCROOT)/epoc32/raptor_smoketest_tem_failed"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   125
		]
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   126
	t.warnings = 3
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   127
	t.returncode = 1
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   128
	t.run()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   129
	if t.result == SmokeTest.FAIL:
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   130
		result = SmokeTest.FAIL
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   131
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   132
	t.id = "18"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   133
	t.name = "temtest"
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   134
	t.result = result
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   135
	t.print_result()
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
   136
	return t