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