sbsv2/raptor/test/smoke_suite/keepgoing.py
author Daniel Jacobs <daniel.jacobs@nokia.com>
Thu, 13 May 2010 14:14:32 +0100
changeset 553 7d4971eaf863
parent 374 96629a6f26e4
permissions -rw-r--r--
Merge from wip.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
370
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
     1
#
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
     2
# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
     3
# All rights reserved.
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
     4
# This component and the accompanying materials are made available
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
     5
# under the terms of the License "Eclipse Public License v1.0"
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
     6
# which accompanies this distribution, and is available
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
     8
#
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
     9
# Initial Contributors:
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    10
# Nokia Corporation - initial contribution.
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    11
#
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    12
# Contributors:
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    13
#
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    14
# Description: 
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    15
#
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    16
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    17
from raptor_tests import SmokeTest
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    18
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    19
def run():
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    20
	t = SmokeTest()
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    21
	t.description = """Raptor should keep going and build as much as possible with the -k option specified."""
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    22
	
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    23
	command = "sbs -b smoke_suite/test_resources/simple/bld.inf -k"
371
2db10eac415a test data for bad groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 370
diff changeset
    24
	config = " --configpath=test/smoke_suite/test_resources/keepgoing"
370
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    25
	targets = [
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    26
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    27
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe.map",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    28
		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    29
		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe.map",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    30
		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe.sym",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    31
		"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe.sym"
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    32
		]	
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    33
	buildtargets = [
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    34
		"test_/armv5/udeb/test.o",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    35
		"test_/armv5/urel/test.o",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    36
		"test_/armv5/udeb/test.o.d",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    37
		"test_/armv5/udeb/test3.o.d",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    38
		"test_/armv5/udeb/test4.o.d",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    39
		"test_/armv5/udeb/test5.o.d",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    40
		"test_/armv5/udeb/test1.o.d",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    41
		"test_/armv5/udeb/test6.o.d",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    42
		"test_/armv5/udeb/test2.o.d",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    43
		"test_/armv5/udeb/test3.o",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    44
		"test_/armv5/udeb/test4.o",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    45
		"test_/armv5/udeb/test5.o",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    46
		"test_/armv5/udeb/test1.o",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    47
		"test_/armv5/udeb/test6.o",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    48
		"test_/armv5/udeb/test2.o",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    49
		"test_/armv5/urel/test.o.d",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    50
		"test_/armv5/urel/test3.o.d",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    51
		"test_/armv5/urel/test4.o.d",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    52
		"test_/armv5/urel/test5.o.d",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    53
		"test_/armv5/urel/test1.o.d",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    54
		"test_/armv5/urel/test6.o.d",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    55
		"test_/armv5/urel/test2.o.d",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    56
		"test_/armv5/urel/test3.o",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    57
		"test_/armv5/urel/test4.o",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    58
		"test_/armv5/urel/test5.o",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    59
		"test_/armv5/urel/test1.o",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    60
		"test_/armv5/urel/test6.o",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    61
		"test_/armv5/urel/test2.o",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    62
		"test_/armv5/udeb/test_udeb_objects.via",
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    63
		"test_/armv5/urel/test_urel_objects.via"
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    64
		]
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    65
	
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    66
	# using a non-existent config with -c should build any independent configs
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    67
	t.id = "115a"
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    68
	t.name = "keepgoing_bad_config"
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    69
	t.command = command + " -c armv5 -c armv5.bogus"
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    70
	t.targets = targets
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    71
	t.addbuildtargets("smoke_suite/test_resources/simple/bld.inf", buildtargets)
374
96629a6f26e4 fault tolerant XML groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 371
diff changeset
    72
	t.mustmatch = ["sbs: error: Unknown build variant 'bogus'"]
370
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    73
	t.warnings = 0
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    74
	t.errors = 1
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    75
	t.returncode = 1
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    76
	t.run()
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    77
	
371
2db10eac415a test data for bad groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 370
diff changeset
    78
	# using groups with bad sub-groups should build any independent groups
2db10eac415a test data for bad groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 370
diff changeset
    79
	t.id = "115b"
2db10eac415a test data for bad groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 370
diff changeset
    80
	t.name = "keepgoing_bad_subgroup"
2db10eac415a test data for bad groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 370
diff changeset
    81
	t.command = command + config + " -c lots_of_products"
374
96629a6f26e4 fault tolerant XML groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 371
diff changeset
    82
	t.mustmatch = ["Unknown reference 'qwertyuio'",
96629a6f26e4 fault tolerant XML groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 371
diff changeset
    83
	               "Unknown reference 'asdfghjkl'",
96629a6f26e4 fault tolerant XML groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 371
diff changeset
    84
	               "Unknown reference 'zxcvbnm_p'"]
371
2db10eac415a test data for bad groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 370
diff changeset
    85
	t.warnings = 0
374
96629a6f26e4 fault tolerant XML groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 371
diff changeset
    86
	t.errors = 3
96629a6f26e4 fault tolerant XML groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 371
diff changeset
    87
	t.returncode = 1
96629a6f26e4 fault tolerant XML groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 371
diff changeset
    88
	t.run()
96629a6f26e4 fault tolerant XML groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 371
diff changeset
    89
	
96629a6f26e4 fault tolerant XML groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 371
diff changeset
    90
	# using groups with bad sub-sub-groups should build any independent groups
96629a6f26e4 fault tolerant XML groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 371
diff changeset
    91
	t.id = "115c"
96629a6f26e4 fault tolerant XML groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 371
diff changeset
    92
	t.name = "keepgoing_bad_subsubgroup"
96629a6f26e4 fault tolerant XML groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 371
diff changeset
    93
	t.command = command + config + " -c lots_of_products_2"
96629a6f26e4 fault tolerant XML groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 371
diff changeset
    94
	t.mustmatch = ["Unknown reference 'qwertyuio'",
96629a6f26e4 fault tolerant XML groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 371
diff changeset
    95
	               "Unknown reference 'asdfghjkl'",
96629a6f26e4 fault tolerant XML groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 371
diff changeset
    96
	               "Unknown reference 'zxcvbnm_p'"]
96629a6f26e4 fault tolerant XML groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 371
diff changeset
    97
	t.warnings = 0
96629a6f26e4 fault tolerant XML groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 371
diff changeset
    98
	t.errors = 3
371
2db10eac415a test data for bad groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 370
diff changeset
    99
	t.returncode = 1
2db10eac415a test data for bad groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 370
diff changeset
   100
	t.run()
2db10eac415a test data for bad groups
Richard Taylor <richard.i.taylor@nokia.com>
parents: 370
diff changeset
   101
	
370
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
   102
	# summarise	
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
   103
	t.id = "115"
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
   104
	t.name = "keepgoing"
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
   105
	t.print_result()
c86748d54051 a bad config is not a FatalError
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
   106
	return t