contentstorage/caclient/tsrc/t_caclient/decision_cov.pl
changeset 117 c63ee96dbe5f
equal deleted inserted replaced
115:3ab5c078b490 117:c63ee96dbe5f
       
     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 "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: Script for running branch coverage test
       
    15 #
       
    16 
       
    17 #USAGE:
       
    18 #    Usage: decision_cov.pl [-make=command]
       
    19 #    -make=instrument || run || ctcpost
       
    20 
       
    21 # import module
       
    22 use Getopt::Long;
       
    23 
       
    24 # read options
       
    25 my $make = "all";
       
    26 my $success = GetOptions ("make=s"   => \$make);
       
    27 
       
    28 if($make) {
       
    29     if (($make eq "instrument") || ($make eq "all")) {
       
    30 
       
    31 		
       
    32         system("rmdir /s /q CTCFUNCTION");
       
    33         system("rmdir /s /q CTCDECISION");
       
    34 
       
    35 		chdir("../../..");
       
    36 		system("del mon.sym");
       
    37         system("del mon.dat");
       
    38         system("del profile.txt");
       
    39 		
       
    40         system("call qmake -config coverage");
       
    41         system("call sbs clean -c winscw_udeb");
       
    42         system('ctcwrap -i fd -2comp -C "EXCLUDE=*" -C "EXCLUDE+./srvsrc/casrvengutils.cpp" -C "NO_EXCLUDE+srvsrc/menusrvmain.cpp" -C "NO_EXCLUDE+srvsrc/casrv.cpp" -C "NO_EXCLUDE+srvsrc/cadatamanager.cpp" -C "NO_EXCLUDE+srvsrc/casrveng.cpp" -C "NO_EXCLUDE+srvsrc/casrvnotifier.cpp" -C "NO_EXCLUDE+srvsrc/casrvsession.cpp" -C "NO_EXCLUDE+srvsrc/castorageproxy.cpp" -C "NO_EXCLUDE+cautils/src/cai*" -C "NO_EXCLUDE+cautils/src/cae*" -C "NO_EXCLUDE+cautils/src/cal*" -C "NO_EXCLUDE+extsrc/cai*" -C "NO_EXCLUDE+casrv/casrvmgr/src/casrvmanager.cpp" -C "NO_EXCLUDE+caclient/s60/src/*" -C "NO_EXCLUDE+caclient/src/*" sbs -j 4 -c winscw_udeb');
       
    43 		
       
    44 		chdir("caclient/tsrc/t_caclient");
       
    45         system("call qmake -config coverage");
       
    46         system("call sbs clean -c winscw_udeb.test");
       
    47         system("call sbs clean -c winscw_udeb");
       
    48         system("call sbs -c winscw_udeb");
       
    49         
       
    50         }
       
    51     if (($make eq "run") || ($make eq "all")) {
       
    52         system("call \\epoc32\\release\\winscw\\udeb\\t_caclient -o c:\\t_caclient.log");
       
    53     }
       
    54     if (($make eq "ctcpost") || ($make eq "all")) {
       
    55 		chdir("../../..");
       
    56         system("call ctcpost -ff -p profile.txt");
       
    57         system("call ctc2html -nsb -i profile.txt -o caclient/tsrc/t_caclient/CTCFUNCTION");
       
    58         system("call del profile.txt");
       
    59         system("call ctcpost -fd -p profile.txt");
       
    60         system("call ctc2html -nsb -i profile.txt -o caclient/tsrc/t_caclient/CTCDECISION");
       
    61         system("call del profile.txt");
       
    62     }
       
    63 }
       
    64 
       
    65 print "END.\n";