graphicsdeviceinterface/directgdi/test/scripts/directgditest_setup_sw.bat
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 rem Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 rem All rights reserved.
       
     3 rem This component and the accompanying materials are made available
       
     4 rem under the terms of "Eclipse Public License v1.0"
       
     5 rem which accompanies this distribution, and is available
       
     6 rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 rem
       
     8 rem Initial Contributors:
       
     9 rem Nokia Corporation - initial contribution.
       
    10 rem
       
    11 rem Contributors:
       
    12 rem
       
    13 rem Description:
       
    14 rem
       
    15 
       
    16 @echo off
       
    17 
       
    18 rem ================================================================================================
       
    19 rem
       
    20 rem NOTES:
       
    21 rem  - This batch file is used by DABS to automate DirectGDI tests.
       
    22 rem  - This file is both useful for overnight automated testing in DABS as well as a reference
       
    23 rem		for the correct setup of the tests during a manual execution. 
       
    24 rem
       
    25 rem USAGE:
       
    26 rem  :install -> Installs to the correct location all data needed by the test. This is executed as 
       
    27 rem		part of the "pre cmd" specified in the DABS tests lists.
       
    28 rem  :uninstall -> Retrieves all the output from the test, copying it to the appropriate 
       
    29 rem		location. This is executed as part of the "post cmd" specified in the DABS tests lists.
       
    30 rem
       
    31 rem ================================================================================================
       
    32 
       
    33 setlocal
       
    34 
       
    35 :: Initialise local variables
       
    36 set TARGET_PLATFORM=%1
       
    37 set COMMAND_CHOICE=%2
       
    38 
       
    39 set CDRIVE=%EMULATOR_C_DIR%
       
    40 set ZDRIVE=%EPOCROOT%epoc32\data\Z
       
    41 
       
    42 rem install / uninstall iType rasteriser
       
    43 if not exist "%ZDRIVE%\ityperast_config.cmd" echo INFO: %ZDRIVE%\ityperast_config.cmd not found & goto :EOF
       
    44 call %ZDRIVE%\ityperast_config.cmd %COMMAND_CHOICE%  %TARGET_PLATFORM%
       
    45 
       
    46 goto :%COMMAND_CHOICE%
       
    47 
       
    48 :install
       
    49 	rem nothing else to do
       
    50 	goto :EOF
       
    51 	
       
    52 :uninstall
       
    53 	chdir %EPOCROOT%
       
    54 	rem copy reference image mbms from source to directory used for comparisons
       
    55 	unzip -qo %CDRIVE%\img\reference.zip -d %CDRIVE%\img\ref
       
    56 	rem the next one overwrites some of the mbm copied in the previous copy.
       
    57 	unzip -qo %CDRIVE%\img\replacements_from_directgdi\replacement.zip -d %CDRIVE%\img\ref
       
    58 
       
    59 	rem convert .mbm files to .bmp files and run the bitmap comparison tests, and create html reports
       
    60 	chdir %CDRIVE%\img
       
    61 	perl runtest.pl %TARGET_PLATFORM%
       
    62 	
       
    63 	set LOGDIR=logs
       
    64 	PUSHD \
       
    65 	FOR /D %%G IN (logs*) DO (IF EXIST %%G\%TARGET_PLATFORM% SET LOGDIR=%%G)
       
    66 	POPD
       
    67 	
       
    68 	set RESULTS=\%LOGDIR%\%TARGET_PLATFORM%\directgdi_results
       
    69 	set ONBSUMMARY=\%LOGDIR%\%TARGET_PLATFORM%
       
    70 	if defined COMMANDER_WORKSPACE set RESULTS=%EPOCROOT%epoc32\logs\directgditest\directgdi_results
       
    71 	if defined COMMANDER_WORKSPACE set ONBSUMMARY=%EPOCROOT%epoc32\logs\directgditest
       
    72 	rem copy difference bitmaps, test image bitmaps and reference image bitmaps to results directories
       
    73 	xcopy /IYR %CDRIVE%\img\ref\*.bmp %RESULTS%\img\ref
       
    74 	xcopy /IYR %CDRIVE%\img\test\*.bmp %RESULTS%\img\test
       
    75 	xcopy /IYR %CDRIVE%\img\RGBDiff*.bmp %RESULTS%\img
       
    76 	rem copy results web pages
       
    77 	xcopy /SIYR %CDRIVE%\logs\*.html %RESULTS%\logs
       
    78 	copy %CDRIVE%\directgditest_image_results.htm %ONBSUMMARY%
       
    79 	goto :EOF
       
    80 
       
    81 goto :EOF        
       
    82 
       
    83 endlocal