tsrc/applib_cov.pl
changeset 117 c63ee96dbe5f
equal deleted inserted replaced
115:3ab5c078b490 117:c63ee96dbe5f
       
     1 #!/usr/bin/perl
       
     2 #
       
     3 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     4 # All rights reserved.
       
     5 # This component and the accompanying materials are made available
       
     6 # under the terms of the License "Symbian Foundation License v1.0"
       
     7 # which accompanies this distribution, and is available
       
     8 # at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     9 #
       
    10 # Initial Contributors:
       
    11 # Nokia Corporation - initial contribution.
       
    12 #
       
    13 # Contributors:
       
    14 #
       
    15 # Description:
       
    16 #
       
    17  
       
    18 #USAGE:
       
    19 #    Usage: 101ctc.pl [-make=command]
       
    20 #    -make=instrument || run || ctcpost
       
    21 
       
    22 # import module
       
    23 use Getopt::Long;
       
    24 use Cwd;
       
    25 
       
    26 # read options
       
    27 my $make = "all";
       
    28 my $success = GetOptions ("make=s"   => \$make);
       
    29 
       
    30 if($make) {
       
    31 	
       
    32     if (($make eq "instrument") || ($make eq "all")) {
       
    33 		        
       
    34         `for /R .. %i IN (mon.*) DO del %i`;
       
    35         system("del profile.txt");
       
    36 		`for /D %f IN (CTC*) DO rmdir /S /Q %f`;
       
    37         
       
    38         system("call qmake -config tests_applib -config coverage");
       
    39         system("call sbs -c winscw_udeb reallyclean");        
       
    40         system("ctcwrap -i fd -2comp -C EXCLUDE+*\\internal\\*,*\\tsrc\\*,*\\moc_*.cpp,*\\qrc_*.cpp -C SOURCE_IDENTIFICATION=absolute sbs -c winscw_udeb");
       
    41     }
       
    42     if (($make eq "run") || ($make eq "all")) {
       
    43 		system("\\epoc32\\release\\winscw\\udeb\\cmdrunner.exe srvtests.txt");
       
    44        
       
    45     }
       
    46     if (($make eq "ctcpost") || ($make eq "all")) {
       
    47         system("call ctcpost -ff -p profile.txt");
       
    48         system("call ctc2html -nsb -i profile.txt -o CTCFUNCTION");
       
    49         system("call del profile.txt");
       
    50         system("call ctcpost -T 70 -fd -p profile.txt");
       
    51         system("call ctc2html -t 70 -nsb -i profile.txt -o CTCDECISION");
       
    52     }
       
    53 }
       
    54 
       
    55 print "END.\n";