hswidgetmodel/tsrc/t_hswidgetmodelexe/function_cov.pl
author Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
Thu, 16 Sep 2010 12:11:40 +0100
changeset 117 c63ee96dbe5f
permissions -rw-r--r--
Missing activityfw and taskswitcher components - fix for Bug 3670

#
# 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 function coverage test
#

#!/usr/bin/perl


# import module
use Getopt::Long;

# read options
my $make = "";
my $success = GetOptions ("make=s"   => \$make);

sub printUsage()
{
	print <<USAGE_EOF;
	Usage : perl decision.pl [-make=make command]

	-make=nmake || make

USAGE_EOF
	exit 1;

}

if($make)
{
system("del mon.sym");
system("del mon.dat");
system("rmdir /s /q CTCHTML");

# build hscomponent model lib first
chdir("..");
chdir("..");
system("qmake -r");
system("call $make distclean");
system("call qmake -r");
system("call $make debug");

# build unit test related projects
chdir(tsrc);

system("qmake -r");
system("call $make distclean");
system("call qmake -r");
system("call $make debug");
system("call qmake -r");
system("call $make install");
chdir("t_hswidgetmodelexe");
system("call $make distclean");
system("call qmake -config coverage");
system("ctcwrap -i f -C EXCLUDE=* -C NO_EXCLUDE=./../../src/*.cpp $make debug  Makefile");
chdir("debug");
system("call t_hswidgetmodelexe.exe");
chdir("..");
system("call ctcpost -p profile.txt");
system("call ctc2html -i profile.txt");
}
else
{
printUsage();
}