sbsv2/raptor/test/smoke_suite/timing.py
branchwip
changeset 30 01c962c3f631
child 538 71918f4840ed
equal deleted inserted replaced
29:ee00c00df073 30:01c962c3f631
       
     1 #
       
     2 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 # All rights reserved.
       
     4 # This component and the accompanying materials are made available
       
     5 # under the terms of the License "Eclipse Public License v1.0"
       
     6 # which accompanies this distribution, and is available
       
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 #
       
     9 # Initial Contributors:
       
    10 # Nokia Corporation - initial contribution.
       
    11 #
       
    12 # Contributors:
       
    13 #
       
    14 # Description: 
       
    15 #
       
    16 
       
    17 from raptor_tests import SmokeTest
       
    18 
       
    19 def run():
       
    20 	t = SmokeTest()
       
    21 	t.usebash = True
       
    22 	
       
    23 	t.description = "Test that a timing log is created and contains total parse and build durations"
       
    24 
       
    25 	t.id = "0103a"
       
    26 	t.name = "timing_off"
       
    27 	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -f-"
       
    28 	t.mustnotmatch = [
       
    29 			".*progress:discovery.*",
       
    30 			".*progress:start.*",
       
    31 			".*progress:end.*"
       
    32 			]
       
    33 	t.run()
       
    34 
       
    35 
       
    36 	t.id = "0103b"
       
    37 	t.name = "timing_on"
       
    38 	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf --timing " + \
       
    39 			"--filters=FilterLogfile,FilterTiming -f ${SBSLOGFILE} && " + \
       
    40 			"grep progress:duration ${SBSLOGFILE}.timings"
       
    41 	t.mustmatch = [
       
    42 			"^<progress:duration object_type='layer' task='parse' key='.*' duration='\d+.\d+' />$",
       
    43 			"^<progress:duration object_type='layer' task='build' key='.*' duration='\d+.\d+' />$",
       
    44 			"^<progress:duration object_type='all' task='all' key='all' duration='\d+.\d+' />$"
       
    45 			]
       
    46 	t.mustnotmatch = []
       
    47 	t.run()
       
    48 
       
    49 
       
    50 	t.id = "103"
       
    51 	t.name = "timing"
       
    52 	t.print_result()
       
    53 	
       
    54 	return t
       
    55