localisation/apparchitecture/tef/tssaac/scripts/hardware/sysstart_apparc_buildrom.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 TEST_CASE=%1
       
    21 set TESTCASE_NUMBER=%2
       
    22 
       
    23 set RSC_LOCATION=\epoc32\data\Z\private\10205C44
       
    24 set TEST_RSC=%RSC_LOCATION%\tssaac_hardware.RSC
       
    25 set SM0_RSC=%RSC_LOCATION%\SSCForStartupMode0_target.RSC
       
    26 
       
    27 set TEST_ROM_FLAG=false
       
    28 if /i "%3"=="TEST_ROM_ONLY" set TEST_ROM_FLAG=true
       
    29 
       
    30 if /i "%TEST_ROM_FLAG%"=="true" set TEST_RSC=%RSC_LOCATION%\appfwk_sysstart_test_eshell_hardware.RSC
       
    31 
       
    32 call :%TEST_CASE%
       
    33 
       
    34 set AUTOEXEC=autoexec.bat
       
    35 set AUTOEXEC_LOC=\epoc32\data\z\apparctest\%AUTOEXEC%
       
    36 
       
    37 set APPARCTEST_IBY=\epoc32\rom\include\apparctest.iby
       
    38 
       
    39 set EPOCWIND=%TEMP%\epocwind.out
       
    40 
       
    41 set SSAAC_RESULT_FILE=\epoc32\data\z\apparctest\T_SSAAC_PanicResultFile.txt
       
    42 set TESTCASE_CONFIG=\epoc32\data\z\apparctest\TestCaseConfig.txt
       
    43 
       
    44 set DABS_SCRIPT=\logs\autorom\TESTEXECUTEapparctest_%TEST_CASE%.script.txt
       
    45 
       
    46 set DABS_FLAG=%4
       
    47 
       
    48 set HARDWARE_REFERENCE_PLATFORM=%5
       
    49 
       
    50 goto :skipFunctions
       
    51 
       
    52 :restore
       
    53 	cd\
       
    54 	if exist %APPARCTEST_IBY%.original copy %APPARCTEST_IBY%.original %APPARCTEST_IBY% > NUL
       
    55 	if exist %APPARCTEST_IBY%.original del %APPARCTEST_IBY%.original >NUL
       
    56 
       
    57 	if exist %SM0_RSC%.original copy %SM0_RSC%.original %SM0_RSC% > NUL
       
    58 	if exist %SM0_RSC%.original del %SM0_RSC%.original 
       
    59 
       
    60 	if exist %TESTCASE_CONFIG% del %TESTCASE_CONFIG% >NUL
       
    61 	
       
    62 	if exist %DABS_SCRIPT% del %DABS_SCRIPT% >NUL
       
    63 	if exist %AUTOEXEC_LOC% del %AUTOEXEC_LOC% >NUL
       
    64 goto :EOF
       
    65 
       
    66 :configure
       
    67 	if not exist %SM0_RSC%.original copy %SM0_RSC% %SM0_RSC%.original > NUL
       
    68 	copy %TEST_RSC% %SM0_RSC% > NUL
       
    69 
       
    70 	if not exist %APPARCTEST_IBY%.original copy %APPARCTEST_IBY% %APPARCTEST_IBY%.original > NUL
       
    71 
       
    72 	echo Test Case %TEST_CASE%=%TESTCASE_NUMBER% > %TESTCASE_CONFIG%
       
    73 	echo data=DATAZ_\apparctest\TestCaseConfig.txt  \apparctest\TestCaseConfig.txt >> %APPARCTEST_IBY%
       
    74 	echo data=DATAZ_\apparctest\%AUTOEXEC% \%AUTOEXEC% >> %APPARCTEST_IBY%
       
    75 
       
    76 	if exist %SSAAC_RESULT_FILE% echo copy z:\apparctest\T_SSAAC_PanicResultFile.txt c:\ >> %AUTOEXEC_LOC%
       
    77 
       
    78 	if /i "%DABS_FLAG%"=="true" call :configureDabs & goto :EOF
       
    79 
       
    80 	echo copy z:\apparctest\TestCaseConfig.txt c:\ >>  %AUTOEXEC_LOC%
       
    81 	echo testexecute z:\apparctest\apparctest_%TEST_CASE%.script >> %AUTOEXEC_LOC%
       
    82 	echo md e:\logs >> %AUTOEXEC_LOC%
       
    83 	echo md e:\logs\testexecute >> %AUTOEXEC_LOC%
       
    84 	echo copy c:\logs\testexecute\apparctest_%TEST_CASE%.htm e:\logs\testexecute\ >> %AUTOEXEC_LOC%
       
    85 goto :EOF
       
    86 
       
    87 :configureDabs 
       
    88 	echo testexecute z:\apparctest\apparctest_%TEST_CASE%.script >> %DABS_SCRIPT% 
       
    89 	echo thindump -nop c:\logs\testexecute\apparctest_%TEST_CASE%.htm >> %DABS_SCRIPT% 
       
    90 
       
    91 	echo #include ^<thindump.iby^> >> %APPARCTEST_IBY%
       
    92 	echo data=\logs\autorom\TESTEXECUTEapparctest_%TEST_CASE%.script.txt   \test\TESTEXECUTEapparctest_%TEST_CASE%.script.txt >> %APPARCTEST_IBY%
       
    93 	echo data=\logs\autorom\dummytest.txt   \test\dummytest.txt >> %APPARCTEST_IBY%
       
    94 
       
    95 	echo md c:\logs >> %AUTOEXEC_LOC%
       
    96 	echo md c:\logs\testresults >> %AUTOEXEC_LOC%
       
    97 	echo md c:\system >> %AUTOEXEC_LOC%
       
    98 	echo md c:\system\data >> %AUTOEXEC_LOC%
       
    99 	echo z: >> %AUTOEXEC_LOC%
       
   100 	echo cd test >> %AUTOEXEC_LOC%
       
   101 	echo RUNTESTS TESTEXECUTEapparctest_%TEST_CASE%.script.txt -t 13 >> %AUTOEXEC_LOC%
       
   102 	if "%TEST_ROM_FLAG%"=="false" echo format k: >> %AUTOEXEC_LOC%
       
   103 	if "%TEST_ROM_FLAG%"=="true" echo c: >> %AUTOEXEC_LOC%
       
   104 	if "%TEST_ROM_FLAG%"=="true" echo attrib -r >> %AUTOEXEC_LOC%
       
   105 	if "%TEST_ROM_FLAG%"=="true" echo del c:\*.txt >> %AUTOEXEC_LOC%
       
   106 	if "%TEST_ROM_FLAG%"=="true" echo z: >> %AUTOEXEC_LOC%
       
   107 	echo RUNTESTS dummytest.txt -p >> %AUTOEXEC_LOC%
       
   108 goto :EOF
       
   109 
       
   110 :zipRom
       
   111 	if exist rombld.img call zip sys$rom.zip rombld.img > NUL
       
   112 	if exist rombld.symbol call zip symbol.zip rombld.symbol > NUL
       
   113 	if exist rombld.img echo ROM built: \rom\%TEST_CASE%\sys$rom.zip
       
   114 	if not exist sys$rom.zip echo ERROR: ROM failed to build.
       
   115 goto :EOF
       
   116 
       
   117 :addSsaacResultFile
       
   118 	echo data=DATAZ_\apparctest\T_SSAAC_PanicResultFile.txt  \apparctest\T_SSAAC_PanicResultFile.txt >> %APPARCTEST_IBY%
       
   119 goto :EOF
       
   120 
       
   121 :buildTestRom
       
   122 	cd\
       
   123 	if exist \rom\%TEST_CASE%\testrom rd /s/q \rom\%TEST_CASE%\testrom
       
   124 	md \rom\%TEST_CASE%\testrom
       
   125 	cd \rom\%TEST_CASE%\testrom
       
   126  
       
   127 	echo Building Test ROM for SysStart Apparc test case: %TEST_CASE%
       
   128 	if exist %SSAAC_RESULT_FILE% call :addSsaacResultFile
       
   129 
       
   130 	call buildrom -D_FULL_DEBUG -D_LFFSC %HARDWARE_REFERENCE_PLATFORM% techview.oby platsec.oby appfwk_test.iby -orombld.img> NUL
       
   131 	call :zipRom
       
   132 
       
   133 	if exist %SSAAC_RESULT_FILE% del %SSAAC_RESULT_FILE% >NUL
       
   134 
       
   135 	copy %AUTOEXEC_LOC% \rom\%TEST_CASE%\testrom
       
   136 goto :EOF
       
   137 
       
   138 :build
       
   139 	if not exist %TEST_RSC% echo SysStart Apparc Test: ERROR - test resource file does not exist & goto :EOF
       
   140 
       
   141 	call :restore
       
   142 	call :configure
       
   143 
       
   144 	if "%TEST_ROM_FLAG%"=="false" call :buildRom
       
   145 	if "%TEST_ROM_FLAG%"=="true"  call :buildTestRom
       
   146 
       
   147 	call :restore
       
   148 goto :EOF
       
   149 
       
   150 :buildRom
       
   151 	set LFFSC_FLAG=
       
   152 	if /i "%TEST_FLAG%"=="checkEpocWind" set LFFSC_FLAG=-D_LFFSC
       
   153 
       
   154 	if exist \rom\%TEST_CASE% rd /s/q \rom\%TEST_CASE%
       
   155 
       
   156 	cd\
       
   157 	md \rom\%TEST_CASE%
       
   158 	cd \rom\%TEST_CASE%
       
   159 	if /i "%TEST_FLAG%"=="checkEpocWind" md \rom\%TEST_CASE%\TEST_ROM_REQUIRED
       
   160 
       
   161 	echo Building ROM for SysStart Apparc test case: %TEST_CASE%
       
   162 	call buildrom -D_FULL_DEBUG %LFFSC_FLAG% %HARDWARE_REFERENCE_PLATFORM% techview.oby platsec.oby appfwk_test.iby -orombld.img> rombuild.txt
       
   163 	call :zipRom
       
   164 	copy %AUTOEXEC_LOC% \rom\%TEST_CASE%
       
   165 	echo %HARDWARE_REFERENCE_PLATFORM% UIF-Techview Apparc - %TEST_CASE% > rom_desc.txt
       
   166 goto :EOF
       
   167 
       
   168 :T_TestStartApp1L
       
   169 	set TEST_FLAG=
       
   170 goto :EOF
       
   171 
       
   172 :T_TestLocalisedCaptionL
       
   173 	set TEST_FLAG=
       
   174 	set TEST_RSC=%RSC_LOCATION%\tssaac_tapp_hardware.RSC
       
   175 goto :EOF
       
   176 
       
   177 :T_TestStartApp2L		
       
   178 :T_TestStartApp3L		
       
   179 :T_TestStartApp4L		
       
   180 :T_TestStartApp5L		
       
   181 :T_TestStartApp6L		
       
   182 :T_TestGetAllApps		
       
   183 :T_TestInsertDataTypeL	
       
   184 :T_TestAppForDataTypeL	
       
   185 :T_TestDeleteDataTypeL	
       
   186 :T_TestServiceDiscovery	
       
   187 :T_TestGetAppInfo     	
       
   188 :T_TestAppCount	    	
       
   189 :T_TestCreateDoc
       
   190 	set TEST_FLAG=checkEpocWind
       
   191 goto :EOF
       
   192       
       
   193 :skipFunctions
       
   194 
       
   195 call :build
       
   196 
       
   197 endlocal