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