localisation/apparchitecture/tef/tssaac/scripts/emulator/sysstart_apparc_setup.bat
branchSymbian2
changeset 1 8758140453c0
child 6 c108117318cb
equal deleted inserted replaced
0:e8c1ea2c6496 1:8758140453c0
       
     1 @rem
       
     2 @rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 @rem All rights reserved.
       
     4 @rem This component and the accompanying materials are made available
       
     5 @rem under the terms of the License "Symbian Foundation License v1.0"
       
     6 @rem which accompanies this distribution, and is available
       
     7 @rem at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     8 @rem
       
     9 @rem Initial Contributors:
       
    10 @rem Nokia Corporation - initial contribution.
       
    11 @rem
       
    12 @rem Contributors:
       
    13 @rem
       
    14 @rem Description:
       
    15 @rem
       
    16 @echo off
       
    17 setlocal
       
    18 
       
    19 :: Initialise local variables
       
    20 set COMMAND_CHOICE=%1
       
    21 set RSC_LOCATION=Z\private\10205C44
       
    22 set TEST_CASE=%2
       
    23 set TESTCASE_NUMBER=%3
       
    24 set TEST_RSC=%RSC_LOCATION%\tssaac_emulator.RSC
       
    25 set TEST_EXE_RSC=%RSC_LOCATION%\tssaac_tapp_emulator.RSC
       
    26 set SM0_RSC=%RSC_LOCATION%\SSCForStartupMode0.RSC
       
    27 
       
    28 set TESTCASE_CONFIG=z\apparctest\TestCaseConfig.txt
       
    29 set EPOCWIND=%TEMP%\epocwind.out
       
    30 set TESTNONPANIC_RESULT_FILE=\epoc32\winscw\c\SysStartApparc_TestNonPanic.txt
       
    31 
       
    32 goto :%COMMAND_CHOICE%
       
    33 
       
    34 :install
       
    35 	if not exist "%TEST_RSC%" echo SysStart Test: ERROR - test resource file does not exist & goto :EOF
       
    36 	if not exist "%TEST_EXE_RSC%" echo SysStart Test: ERROR - test resource file does not exist & goto :EOF
       
    37 
       
    38 	if not exist %SM0_RSC%.original copy %SM0_RSC% %SM0_RSC%.original > NUL
       
    39 	
       
    40 	if /i "%TEST_CASE%" NEQ "T_TestLocalisedCaptionL" copy %TEST_RSC% %SM0_RSC% > NUL
       
    41 	if /i "%TEST_CASE%" == "T_TestLocalisedCaptionL" copy %TEST_EXE_RSC% %SM0_RSC% > NUL
       
    42 	
       
    43 	if exist %TESTCASE_CONFIG% del %TESTCASE_CONFIG%
       
    44 	if exist %TESTNONPANIC_RESULT_FILE% del %TESTNONPANIC_RESULT_FILE%
       
    45 
       
    46 	echo Test Case %TEST_CASE%=%TESTCASE_NUMBER% > %TESTCASE_CONFIG%
       
    47 
       
    48 goto :EOF
       
    49 
       
    50 :uninstall
       
    51 	call :restore	
       
    52 	:: TestStartApp1L and TestLocalisedCaptionL are the only non-paniccing test cases
       
    53 	if /i "%TEST_CASE%" == "T_TestStartApp1L" goto :bypass
       
    54 	if /i "%TEST_CASE%" == "T_TestLocalisedCaptionL" goto :bypass
       
    55 	call :test
       
    56 	:bypass
       
    57 	if exist %EPOCROOT%epoc32\winscw\c\T_SSAAC_PanicResultFile.txt del %EPOCROOT%epoc32\winscw\c\T_SSAAC_PanicResultFile.txt
       
    58 goto :EOF
       
    59 
       
    60 :execTimeOut
       
    61 	set TIMEOUT=300
       
    62 	\ExecTimeOut.exe "testexecute.exe z:\apparctest\apparctest_%TEST_CASE%.script" %TIMEOUT%
       
    63 goto :EOF
       
    64 
       
    65 :testExecute
       
    66 	testexecute.exe z:\apparctest\apparctest_%TEST_CASE%.script
       
    67 goto :EOF
       
    68 
       
    69 :test
       
    70 	call z\apparctest\sysstart_apparc_checkEpocWind.bat %TEST_CASE%
       
    71 
       
    72 	if exist %TEMP%\epocwind.out copy %TEMP%\epocwind.out %TEMP%\epocwind.out.temp > NUL
       
    73 
       
    74 	:: If using SYMBIAN overnight DABS test scripts, then utilise ExecTimeOut to ensure
       
    75 	:: execution does not exceed expected execution time.
       
    76 	if exist \ExecTimeOut.exe call :execTimeOut
       
    77 
       
    78 	:: If simply executing manually, then call testexecute directly.
       
    79 	if not exist \ExecTimeOut.exe call :testExecute
       
    80 
       
    81 	if exist %TEMP%\epocwind.out.temp copy %TEMP%\epocwind.out.temp %TEMP%\epocwind.out > NUL
       
    82 	if exist %TEMP%\epocwind.out.temp del %TEMP%\epocwind.out.temp
       
    83 goto :EOF
       
    84 
       
    85 :restore
       
    86 	if exist %SM0_RSC%.original copy %SM0_RSC%.original %SM0_RSC% > NUL
       
    87 	if exist %SM0_RSC%.original del %SM0_RSC%.original
       
    88 goto :EOF
       
    89 
       
    90 endlocal
       
    91