hswidgetmodel/tsrc/t_hswidgetmodelexe/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 # import module
       
    18 use Getopt::Long;
       
    19 
       
    20 # read options
       
    21 my $make = "";
       
    22 my $success = GetOptions ("make=s"   => \$make);
       
    23 
       
    24 sub printUsage()
       
    25 {
       
    26 	print <<USAGE_EOF;
       
    27 	Usage : perl decision.pl [-make=make command]
       
    28 
       
    29 	-make=nmake || make
       
    30 
       
    31 USAGE_EOF
       
    32 	exit 1;
       
    33 
       
    34 }
       
    35 
       
    36 if($make)
       
    37 {
       
    38 system("del mon.sym");
       
    39 system("del mon.dat");
       
    40 system("rmdir /s /q CTCHTML");
       
    41 
       
    42 # build hscomponent model lib first
       
    43 chdir("..");
       
    44 chdir("..");
       
    45 system("qmake -r");
       
    46 system("call $make distclean");
       
    47 system("call qmake -r");
       
    48 system("call $make debug");
       
    49 
       
    50 # build unit test related projects
       
    51 chdir(tsrc);
       
    52 
       
    53 system("qmake -r");
       
    54 system("call $make distclean");
       
    55 system("call qmake -r");
       
    56 system("call $make debug");
       
    57 system("call qmake -r");
       
    58 system("call $make install");
       
    59 chdir("t_hswidgetmodelexe");
       
    60 system("call $make distclean");
       
    61 system("call qmake -config coverage");
       
    62 system("ctcwrap -i fd -C EXCLUDE=* -C NO_EXCLUDE=./../../src/*.cpp $make debug  Makefile");
       
    63 chdir("debug");
       
    64 system("call t_hswidgetmodelexe.exe");
       
    65 chdir("..");
       
    66 system("call ctcpost -p profile.txt");
       
    67 system("call ctc2html -i profile.txt");
       
    68 }
       
    69 else
       
    70 {
       
    71 printUsage();
       
    72 }