os/boardsupport/haitest/bspsvs/suite/testsuites/group/testdriversetup.pl
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
#
sl@0
     2
# Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
# All rights reserved.
sl@0
     4
# This component and the accompanying materials are made available
sl@0
     5
# under the terms of "Eclipse Public License v1.0"
sl@0
     6
# which accompanies this distribution, and is available
sl@0
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
#
sl@0
     9
# Initial Contributors:
sl@0
    10
# Nokia Corporation - initial contribution.
sl@0
    11
#
sl@0
    12
# Contributors:
sl@0
    13
#
sl@0
    14
# Description:
sl@0
    15
#
sl@0
    16
sl@0
    17
use Getopt::Long;
sl@0
    18
use Cwd;
sl@0
    19
sl@0
    20
sl@0
    21
sub Usage()
sl@0
    22
	{
sl@0
    23
	print <<USAGE_EOF;
sl@0
    24
Usage
sl@0
    25
perl testdriversetup.pl --statlite=StatLite
sl@0
    26
sl@0
    27
    StatLite = [true | false ]
sl@0
    28
sl@0
    29
    --help                      : This help
sl@0
    30
USAGE_EOF
sl@0
    31
	exit( 0 )
sl@0
    32
	}
sl@0
    33
sl@0
    34
sub main()
sl@0
    35
	{
sl@0
    36
	my	$help='';
sl@0
    37
	my	$statLite="";
sl@0
    38
sl@0
    39
	GetOptions(
sl@0
    40
		'statlite=s'=> \$statLite,
sl@0
    41
		'help' 		=> \$help
sl@0
    42
	);
sl@0
    43
sl@0
    44
	if($help or (($statLite ne "true") and ($statLite ne "false")) )
sl@0
    45
		{
sl@0
    46
		Usage();
sl@0
    47
		exit(0);
sl@0
    48
		}
sl@0
    49
sl@0
    50
	my $theEpocRoot=$ENV{EPOCROOT};
sl@0
    51
	my $epoc32Location="$theEpocRoot.\\epoc32";
sl@0
    52
sl@0
    53
	my $currentDirectory=cwd;
sl@0
    54
	$currentDirectory =~ s/Group//i;
sl@0
    55
	$currentDirectory =~ s/\//\\/g;
sl@0
    56
sl@0
    57
	my $currentDrive = substr($currentDirectory,0,2);
sl@0
    58
sl@0
    59
	my	$cmd="TestDriver config";
sl@0
    60
	my	$suite="file:/$currentDrive$epoc32Location\\testdriver\\salt\\base.driver";
sl@0
    61
	$suite =~ s.\\./.g;
sl@0
    62
	$suite =~ s\/./\/\g;
sl@0
    63
sl@0
    64
	$cmd .= " --bldclean OFF";
sl@0
    65
	$cmd .= " --bldmake OFF";
sl@0
    66
	$cmd .= " -e $currentDrive$theEpocRoot";
sl@0
    67
	$cmd .= " -x $currentDrive$epoc32Location\\testdriver\\salt";
sl@0
    68
	$cmd .= " --repos $currentDrive$epoc32Location\\testdriver\\Repository";
sl@0
    69
	$cmd .= " -c $currentDrive$epoc32Location\\testdriver\\Results";
sl@0
    70
	$cmd .= " -i $currentDirectory";
sl@0
    71
	$cmd .= " -s $suite";
sl@0
    72
	$cmd .= " --source $currentDirectory";
sl@0
    73
	$cmd .= " --tp $currentDirectory";
sl@0
    74
	$cmd .= " --testexec true";
sl@0
    75
	$cmd .= " --statlite $statLite";
sl@0
    76
	$cmd .= " --teflite true";
sl@0
    77
	$cmd .= " --commdb overwrite";
sl@0
    78
	system("$cmd");
sl@0
    79
	}
sl@0
    80
sl@0
    81
main();