sbsv2/raptor/test/smoke_suite/timing.py
author jchatten@4GBL06739.NOE.Nokia.com
Fri, 04 Dec 2009 13:21:39 +0000
branchwip
changeset 35 1f5c7ffaf4c5
parent 30 01c962c3f631
child 538 71918f4840ed
permissions -rw-r--r--
Remove spurious bracket from ARM link of TEXTNOTIFIER2 builds.

#
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of the License "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
# Initial Contributors:
# Nokia Corporation - initial contribution.
#
# Contributors:
#
# Description: 
#

from raptor_tests import SmokeTest

def run():
	t = SmokeTest()
	t.usebash = True
	
	t.description = "Test that a timing log is created and contains total parse and build durations"

	t.id = "0103a"
	t.name = "timing_off"
	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -f-"
	t.mustnotmatch = [
			".*progress:discovery.*",
			".*progress:start.*",
			".*progress:end.*"
			]
	t.run()


	t.id = "0103b"
	t.name = "timing_on"
	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf --timing " + \
			"--filters=FilterLogfile,FilterTiming -f ${SBSLOGFILE} && " + \
			"grep progress:duration ${SBSLOGFILE}.timings"
	t.mustmatch = [
			"^<progress:duration object_type='layer' task='parse' key='.*' duration='\d+.\d+' />$",
			"^<progress:duration object_type='layer' task='build' key='.*' duration='\d+.\d+' />$",
			"^<progress:duration object_type='all' task='all' key='all' duration='\d+.\d+' />$"
			]
	t.mustnotmatch = []
	t.run()


	t.id = "103"
	t.name = "timing"
	t.print_result()
	
	return t