tsrc/applib_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

#!/usr/bin/perl
#
# 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 the License "Symbian Foundation License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
#
# Initial Contributors:
# Nokia Corporation - initial contribution.
#
# Contributors:
#
# Description:
#
 
#USAGE:
#    Usage: 101ctc.pl [-make=command]
#    -make=instrument || run || ctcpost

# import module
use Getopt::Long;
use Cwd;

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

if($make) {
	
    if (($make eq "instrument") || ($make eq "all")) {
		        
        `for /R .. %i IN (mon.*) DO del %i`;
        system("del profile.txt");
		`for /D %f IN (CTC*) DO rmdir /S /Q %f`;
        
        system("call qmake -config tests_applib -config coverage");
        system("call sbs -c winscw_udeb reallyclean");        
        system("ctcwrap -i fd -2comp -C EXCLUDE+*\\internal\\*,*\\tsrc\\*,*\\moc_*.cpp,*\\qrc_*.cpp -C SOURCE_IDENTIFICATION=absolute sbs -c winscw_udeb");
    }
    if (($make eq "run") || ($make eq "all")) {
		system("\\epoc32\\release\\winscw\\udeb\\cmdrunner.exe srvtests.txt");
       
    }
    if (($make eq "ctcpost") || ($make eq "all")) {
        system("call ctcpost -ff -p profile.txt");
        system("call ctc2html -nsb -i profile.txt -o CTCFUNCTION");
        system("call del profile.txt");
        system("call ctcpost -T 70 -fd -p profile.txt");
        system("call ctc2html -t 70 -nsb -i profile.txt -o CTCDECISION");
    }
}

print "END.\n";