buildverification/smoketest/SmokeTestClient.pl
branchRCL_3
changeset 10 4ca382093dae
parent 5 6beaa9cf4752
child 11 493058e57c8c
equal deleted inserted replaced
5:6beaa9cf4752 10:4ca382093dae
     1 # Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 # All rights reserved.
       
     3 # This component and the accompanying materials are made available
       
     4 # under the terms of "Eclipse Public License v1.0"
       
     5 # which accompanies this distribution, and is available
       
     6 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 #
       
     8 # Initial Contributors:
       
     9 # Nokia Corporation - initial contribution.
       
    10 #
       
    11 # Contributors:
       
    12 #
       
    13 # Description:
       
    14 # This script was born on 07/10/2004
       
    15 # 
       
    16 #
       
    17 
       
    18 #!/usr/bin/perl -w
       
    19 use strict;
       
    20 use SmokeTest;
       
    21 use Getopt::Long;
       
    22 
       
    23 # Process the commandline
       
    24 my ($iSourceDir, $iTestSuite, $iProduct, $iServerPool, $iProductType, $iPublishLocation, $iBuildNumber, $iXML, $iUnzip, $iBuildDrive, $iTDDrive) = ProcessCommandLine();
       
    25 
       
    26 &SmokeTest::main($iSourceDir, $iTestSuite, $iProduct, $iServerPool, $iProductType, $iPublishLocation, $iBuildNumber, $iXML, $iUnzip, $iBuildDrive, $iTDDrive);
       
    27 
       
    28 # ProcessCommandLine
       
    29 #
       
    30 # Description
       
    31 # This function processes the commandline
       
    32 
       
    33 sub ProcessCommandLine
       
    34 {
       
    35   my ($iHelp);
       
    36   
       
    37   GetOptions('h' => \$iHelp, 'src=s' => \$iSourceDir, 'pool=s' => \$iServerPool, 'product=s' => \$iProduct, 'suite=s' => \$iTestSuite, 'type=s' => \$iProductType, 'publish=s' => \$iPublishLocation, 'build=s' => \$iBuildNumber, , 'xml=s' => \$iXML, 'unziptd' => \$iUnzip, 'builddrive=s' => \$iBuildDrive, 'tddrive=s' => \$iTDDrive);
       
    38 
       
    39   if (($iHelp) || (!defined $iSourceDir) || (!defined $iTestSuite) || (!defined $iProduct) || (!defined $iBuildDrive))
       
    40   {
       
    41     Usage();
       
    42   }
       
    43   
       
    44   return ($iSourceDir, $iTestSuite, $iProduct, $iServerPool, $iProductType, $iPublishLocation, $iBuildNumber, $iXML, $iUnzip, $iBuildDrive, $iTDDrive);
       
    45 }
       
    46 
       
    47 # Usage
       
    48 #
       
    49 # Output Usage Information.
       
    50 #
       
    51 
       
    52 sub Usage 
       
    53 {
       
    54   print <<USAGE_EOF;
       
    55 
       
    56   Usage: SmokeTestClient.pl [switches]
       
    57 
       
    58   [Switches]
       
    59   --suite Test Driver test suite (e.g. SmokeTest)
       
    60   --src source code directory (e.g .\\src\\common\\testtools)
       
    61   		[NOTE: The test suite directory should be located in this directory]
       
    62   --product product being tested (e.g. 9.1)
       
    63   --builddrive The drive where the source and epoc32 is (e.g. M:)
       
    64   
       
    65   [Optional]
       
    66   -h help
       
    67   --pool hash separated smoketest server pool (e.g. lon-sysbuild05\#lon-sysbuild06)
       
    68   --type type of build, either Master or Symbian_OS_v8.1
       
    69   --publish Publish server for the smoke test results (e.g. \\\\builds01)
       
    70   --build Build Number (e.g. 03555_Symbian_OS_v9.1)
       
    71   --xml TestDriver XML tree. Default is \\src\\common\\testtools\\SmokeTest\\xml.
       
    72   --unziptd Installs a stable version of TestDriver from \\\\builds01\\devbuilds\\BuildTeam\\TestDriver
       
    73   --tddrive The drive where testdriver is installed (default is C: and TD directory is c:\\testdriver)
       
    74   
       
    75   All the optional arguments are either specified by the user or assumed to be set as environment variables.
       
    76   These environment variables can be found in SmokeTest.pm
       
    77 
       
    78 USAGE_EOF
       
    79 	exit 1;
       
    80 }