build/tools/build_tbs.cmd
branchRCL_3
changeset 25 28f63f2a6ccb
parent 16 e541da0d3b0d
equal deleted inserted replaced
16:e541da0d3b0d 25:28f63f2a6ccb
     1 @echo off
       
     2 rem
       
     3 rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     4 rem All rights reserved.
       
     5 rem This component and the accompanying materials are made available
       
     6 rem under the terms of "Eclipse Public License v1.0"
       
     7 rem which accompanies this distribution, and is available
       
     8 rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     9 rem
       
    10 rem Initial Contributors:
       
    11 rem Nokia Corporation - initial contribution.
       
    12 rem
       
    13 rem Contributors:
       
    14 rem
       
    15 rem Description:
       
    16 rem
       
    17 @echo on
       
    18 
       
    19 @echo off
       
    20 setlocal
       
    21 echo build_tbs
       
    22 echo usage:   build_tbs.cmd "input xml file without extension" ["inputfile path"]
       
    23 echo usage:   inputfile path is optional cases that command launch different path as inputfile
       
    24 echo example: build_tbs.cmd S60Build \epoc32\tools\s60tools\
       
    25 echo example: build_tbs.cmd S60Build
       
    26 
       
    27 echo set build tools path
       
    28 PATH=%PATH%;\epoc32\tools\s60tools\
       
    29 
       
    30 rem set port 1971 for TBS by default 
       
    31 if not defined TBS_PORT (
       
    32 call set TBS_PORT=1971
       
    33 )
       
    34 
       
    35 rem set 2 processor by default
       
    36 if not defined NUMBER_OF_PROCESSORS (
       
    37 call set NUMBER_OF_PROCESSORS=2
       
    38 )
       
    39 
       
    40 rem Starts NUMBER_OF_PROCESSORS*2 clients. If NUMBER_OF_PROCESSORS is set to "0" start one client
       
    41 if "%NUMBER_OF_PROCESSORS%" equ "0" (
       
    42 call set /a LOOP=1
       
    43 ) else (
       
    44 call set /a LOOP=%NUMBER_OF_PROCESSORS%*2
       
    45 )
       
    46 echo start clients
       
    47 :loopagain
       
    48 call set /a LOOP-=1
       
    49 call start cmd /C "\epoc32\tools\build\buildclient.pl -w 5 -c Client%LOOP% -d localhost:%TBS_PORT% -e 1"
       
    50 perl -le "sleep 1"
       
    51 if not "%LOOP%" equ "0" goto :loopagain
       
    52 
       
    53 echo delete old build log
       
    54 if exist %LOGS_PATH%scanlog_%1.html (
       
    55 call del /q %LOGS_PATH%scanlog_%1.html
       
    56 )
       
    57 echo start build server
       
    58 call perl \epoc32\tools\build\buildserver.pl -p %TBS_PORT% -d %2%1.xml -l %LOGS_PATH%%1_bld.log
       
    59 
       
    60 call perl \epoc32\tools\htmlscanlog.pl -l %LOGS_PATH%%1_bld.log -o %LOGS_PATH%scanlog_%1.html -v
       
    61 
       
    62 endlocal
       
    63 
       
    64 
       
    65