haitest/bspsvs/suite/testsuites/group/testdriversetup.pl
changeset 0 cec860690d41
equal deleted inserted replaced
-1:000000000000 0:cec860690d41
       
     1 #
       
     2 # Copyright (c) 2005-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:
       
    15 #
       
    16 
       
    17 use Getopt::Long;
       
    18 use Cwd;
       
    19 
       
    20 
       
    21 sub Usage()
       
    22 	{
       
    23 	print <<USAGE_EOF;
       
    24 Usage
       
    25 perl testdriversetup.pl --statlite=StatLite
       
    26 
       
    27     StatLite = [true | false ]
       
    28 
       
    29     --help                      : This help
       
    30 USAGE_EOF
       
    31 	exit( 0 )
       
    32 	}
       
    33 
       
    34 sub main()
       
    35 	{
       
    36 	my	$help='';
       
    37 	my	$statLite="";
       
    38 
       
    39 	GetOptions(
       
    40 		'statlite=s'=> \$statLite,
       
    41 		'help' 		=> \$help
       
    42 	);
       
    43 
       
    44 	if($help or (($statLite ne "true") and ($statLite ne "false")) )
       
    45 		{
       
    46 		Usage();
       
    47 		exit(0);
       
    48 		}
       
    49 
       
    50 	my $theEpocRoot=$ENV{EPOCROOT};
       
    51 	my $epoc32Location="$theEpocRoot.\\epoc32";
       
    52 
       
    53 	my $currentDirectory=cwd;
       
    54 	$currentDirectory =~ s/Group//i;
       
    55 	$currentDirectory =~ s/\//\\/g;
       
    56 
       
    57 	my $currentDrive = substr($currentDirectory,0,2);
       
    58 
       
    59 	my	$cmd="TestDriver config";
       
    60 	my	$suite="file:/$currentDrive$epoc32Location\\testdriver\\salt\\base.driver";
       
    61 	$suite =~ s.\\./.g;
       
    62 	$suite =~ s\/./\/\g;
       
    63 
       
    64 	$cmd .= " --bldclean OFF";
       
    65 	$cmd .= " --bldmake OFF";
       
    66 	$cmd .= " -e $currentDrive$theEpocRoot";
       
    67 	$cmd .= " -x $currentDrive$epoc32Location\\testdriver\\salt";
       
    68 	$cmd .= " --repos $currentDrive$epoc32Location\\testdriver\\Repository";
       
    69 	$cmd .= " -c $currentDrive$epoc32Location\\testdriver\\Results";
       
    70 	$cmd .= " -i $currentDirectory";
       
    71 	$cmd .= " -s $suite";
       
    72 	$cmd .= " --source $currentDirectory";
       
    73 	$cmd .= " --tp $currentDirectory";
       
    74 	$cmd .= " --testexec true";
       
    75 	$cmd .= " --statlite $statLite";
       
    76 	$cmd .= " --teflite true";
       
    77 	$cmd .= " --commdb overwrite";
       
    78 	system("$cmd");
       
    79 	}
       
    80 
       
    81 main();