sbsv2/raptor/test/smoke_suite/terminal_filter_tests.py
author Richard Taylor <richard.i.taylor@nokia.com>
Tue, 16 Mar 2010 17:04:21 +0000
branchfix
changeset 378 169ad30bb410
parent 3 e1eecf4d390d
permissions -rw-r--r--
extend terminal filter tests
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     1
#
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     2
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     3
# All rights reserved.
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     4
# This component and the accompanying materials are made available
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     5
# under the terms of the License "Eclipse Public License v1.0"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     6
# which accompanies this distribution, and is available
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     8
#
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     9
# Initial Contributors:
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    10
# Nokia Corporation - initial contribution.
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    11
#
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    12
# Contributors:
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    13
#
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    14
# Description: 
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    15
#
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    16
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    17
from raptor_tests import SmokeTest
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    18
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    19
def run():
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    20
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    21
	t = SmokeTest()
378
169ad30bb410 extend terminal filter tests
Richard Taylor <richard.i.taylor@nokia.com>
parents: 3
diff changeset
    22
	t.description = "Tests against log files to ensure it 'does the right thing'"
169ad30bb410 extend terminal filter tests
Richard Taylor <richard.i.taylor@nokia.com>
parents: 3
diff changeset
    23
	
169ad30bb410 extend terminal filter tests
Richard Taylor <richard.i.taylor@nokia.com>
parents: 3
diff changeset
    24
	t.id = "87a"
169ad30bb410 extend terminal filter tests
Richard Taylor <richard.i.taylor@nokia.com>
parents: 3
diff changeset
    25
	t.name = "terminal_filter_tests_log"
3
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    26
	t.command = "$(SBS_HOME)/test/smoke_suite/test_resources/refilter/testfilterterminal"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    27
	t.countmatch = [
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    28
		# One of each type of error occurs early in the 'sbs' call where there
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    29
		# is a recipe inside another recipe. Then the errors occur in the
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    30
		# opposite order where are 2 closing tags next to each other before 2
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    31
		# opening tags appear next to each other
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    32
			["sbs: error: Opening recipe tag found before closing recipe tag for previous recipe:", 2],
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    33
			["Discarding previous recipe \(Possible logfile corruption\)", 2],
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    34
			["sbs: error: Closing recipe tag found before opening recipe tag:", 2],
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    35
			["Unable to print recipe data \(Possible logfile corruption\)", 2]
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    36
	]
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    37
	t.errors = 4
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    38
	t.run()
378
169ad30bb410 extend terminal filter tests
Richard Taylor <richard.i.taylor@nokia.com>
parents: 3
diff changeset
    39
	
169ad30bb410 extend terminal filter tests
Richard Taylor <richard.i.taylor@nokia.com>
parents: 3
diff changeset
    40
	t.id = "87b"
169ad30bb410 extend terminal filter tests
Richard Taylor <richard.i.taylor@nokia.com>
parents: 3
diff changeset
    41
	t.name = "terminal_filter_tests_configs"
169ad30bb410 extend terminal filter tests
Richard Taylor <richard.i.taylor@nokia.com>
parents: 3
diff changeset
    42
	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf"
169ad30bb410 extend terminal filter tests
Richard Taylor <richard.i.taylor@nokia.com>
parents: 3
diff changeset
    43
	t.countmatch = []
169ad30bb410 extend terminal filter tests
Richard Taylor <richard.i.taylor@nokia.com>
parents: 3
diff changeset
    44
	t.errors = 0
169ad30bb410 extend terminal filter tests
Richard Taylor <richard.i.taylor@nokia.com>
parents: 3
diff changeset
    45
	t.mustmatch_singleline = ["built 'armv5_urel'",
169ad30bb410 extend terminal filter tests
Richard Taylor <richard.i.taylor@nokia.com>
parents: 3
diff changeset
    46
							  "built 'armv5_udeb'",
169ad30bb410 extend terminal filter tests
Richard Taylor <richard.i.taylor@nokia.com>
parents: 3
diff changeset
    47
							  "built 'winscw_urel'",
169ad30bb410 extend terminal filter tests
Richard Taylor <richard.i.taylor@nokia.com>
parents: 3
diff changeset
    48
							  "built 'winscw_udeb'" ]
169ad30bb410 extend terminal filter tests
Richard Taylor <richard.i.taylor@nokia.com>
parents: 3
diff changeset
    49
	t.run()
169ad30bb410 extend terminal filter tests
Richard Taylor <richard.i.taylor@nokia.com>
parents: 3
diff changeset
    50
	
169ad30bb410 extend terminal filter tests
Richard Taylor <richard.i.taylor@nokia.com>
parents: 3
diff changeset
    51
	t.id = "87"
169ad30bb410 extend terminal filter tests
Richard Taylor <richard.i.taylor@nokia.com>
parents: 3
diff changeset
    52
	t.name = "terminal_filter_tests"
169ad30bb410 extend terminal filter tests
Richard Taylor <richard.i.taylor@nokia.com>
parents: 3
diff changeset
    53
	t.print_result()
3
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    54
	return t