localisation/apparchitecture/tef/tssaac/scripts/emulator/sysstart_apparc_run.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 set SYSSTART_APPARCTEST_SUMMARY=\epoc32\winscw\c\logs\testexecute\sysstart_apparctest_summary.txt
       
    20 if exist %SYSSTART_APPARCTEST_SUMMARY% del %SYSSTART_APPARCTEST_SUMMARY%
       
    21 
       
    22 goto :skipFunctions
       
    23 
       
    24 :test
       
    25 	set TEST_CASE=%1
       
    26 	set TESTCASE_NUMBER=%2
       
    27 	set EPOCWIND_COPY=\epoc32\winscw\c\logs\testexecute\apparctest_%TEST_CASE%_epocwind.out
       
    28 	set EPOCWIND_ORIG=%TEMP%\epocwind.out
       
    29 
       
    30 	call z\apparctest\sysstart_apparc_setup.bat install   %TEST_CASE% %TESTCASE_NUMBER%
       
    31 
       
    32 	echo testexecute.exe z:\apparctest\apparctest_%TEST_CASE%.script
       
    33 	testexecute.exe z:\apparctest\apparctest_%TEST_CASE%.script
       
    34 
       
    35 	call z\apparctest\sysstart_apparc_setup.bat uninstall %TEST_CASE% 
       
    36 
       
    37 	copy %EPOCWIND_ORIG% %EPOCWIND_COPY% >NUL
       
    38 	call :updateTestSummary
       
    39 goto :EOF
       
    40 
       
    41 :checkLog
       
    42 	:: checkLog SEARCH_FILE SEARCH_STRING EXPECTED_NUMBER_OF_OCCURENCES
       
    43 	set SEARCH_FILE=%1
       
    44 	set SEARCH_STRING=%2
       
    45 	set TEMP_FILE=sysstart_temp.txt
       
    46 	set EXPECTED_COUNT=%3
       
    47 	set LOG_COUNT=0
       
    48 	type %SEARCH_FILE% | find /c %SEARCH_STRING%>%TEMP_FILE%
       
    49 	for /f "delims=\" %%i in ('type %TEMP_FILE%') do set LOG_COUNT=%%i
       
    50 	del %TEMP_FILE%
       
    51 	if "%EXPECTED_COUNT%" ==  "%LOG_COUNT%" goto :EOF
       
    52 	if "%EXPECTED_COUNT%" NEQ "%LOG_COUNT%" set TEST_RESULT_FLAG=FAIL
       
    53 goto :EOF
       
    54 
       
    55 :updateTestSummary
       
    56 	set TEST_RESULT_FLAG=PASS
       
    57 	call :checkLog \epoc32\winscw\c\logs\testexecute\apparctest_%TEST_CASE%.htm "%TEST_CASE% ***Result = PASS" 1
       
    58 	echo %TEST_CASE% - %TEST_RESULT_FLAG% >> %SYSSTART_APPARCTEST_SUMMARY%
       
    59 goto :EOF
       
    60 
       
    61 :skipFunctions 
       
    62     
       
    63 :: SysStart Apparc Function call tests
       
    64 call :test T_TestStartApp1L		01  
       
    65 call :test T_TestStartApp2L		02        
       
    66 call :test T_TestStartApp3L		03     
       
    67 call :test T_TestStartApp4L		04	   
       
    68 call :test T_TestStartApp5L		05     
       
    69 call :test T_TestStartApp6L		06     
       
    70 call :test T_TestGetAllApps		07     
       
    71 call :test T_TestInsertDataTypeL	08
       
    72 call :test T_TestAppForDataTypeL	09 
       
    73 call :test T_TestDeleteDataTypeL	10 
       
    74 call :test T_TestServiceDiscovery	11  
       
    75 call :test T_TestGetAppInfo     	12
       
    76 call :test T_TestAppCount	    	13
       
    77 call :test T_TestCreateDoc      	14
       
    78 call :test T_TestLocalisedCaptionL	29
       
    79 
       
    80 endlocal