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