diff -r 3ab5c078b490 -r c63ee96dbe5f contentstorage/caclient/tsrc/t_caclient/decision_cov.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contentstorage/caclient/tsrc/t_caclient/decision_cov.pl Thu Sep 16 12:11:40 2010 +0100 @@ -0,0 +1,65 @@ +# +# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: Script for running branch coverage test +# + +#USAGE: +# Usage: decision_cov.pl [-make=command] +# -make=instrument || run || ctcpost + +# import module +use Getopt::Long; + +# read options +my $make = "all"; +my $success = GetOptions ("make=s" => \$make); + +if($make) { + if (($make eq "instrument") || ($make eq "all")) { + + + system("rmdir /s /q CTCFUNCTION"); + system("rmdir /s /q CTCDECISION"); + + chdir("../../.."); + system("del mon.sym"); + system("del mon.dat"); + system("del profile.txt"); + + system("call qmake -config coverage"); + system("call sbs clean -c winscw_udeb"); + 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'); + + chdir("caclient/tsrc/t_caclient"); + system("call qmake -config coverage"); + system("call sbs clean -c winscw_udeb.test"); + system("call sbs clean -c winscw_udeb"); + system("call sbs -c winscw_udeb"); + + } + if (($make eq "run") || ($make eq "all")) { + system("call \\epoc32\\release\\winscw\\udeb\\t_caclient -o c:\\t_caclient.log"); + } + if (($make eq "ctcpost") || ($make eq "all")) { + chdir("../../.."); + system("call ctcpost -ff -p profile.txt"); + system("call ctc2html -nsb -i profile.txt -o caclient/tsrc/t_caclient/CTCFUNCTION"); + system("call del profile.txt"); + system("call ctcpost -fd -p profile.txt"); + system("call ctc2html -nsb -i profile.txt -o caclient/tsrc/t_caclient/CTCDECISION"); + system("call del profile.txt"); + } +} + +print "END.\n";