hswidgetmodel/tsrc/t_hswidgetmodelexe/function_cov.pl
changeset 117 c63ee96dbe5f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hswidgetmodel/tsrc/t_hswidgetmodelexe/function_cov.pl	Thu Sep 16 12:11:40 2010 +0100
@@ -0,0 +1,75 @@
+#
+# 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();
+}
\ No newline at end of file