os/kernelhwsrv/kerneltest/f32test/group/wintest.bat
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kerneltest/f32test/group/wintest.bat	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,184 @@
     1.4 +@echo off
     1.5 +rem
     1.6 +rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +rem All rights reserved.
     1.8 +rem This component and the accompanying materials are made available
     1.9 +rem under the terms of the License "Eclipse Public License v1.0"
    1.10 +rem which accompanies this distribution, and is available
    1.11 +rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.12 +rem
    1.13 +rem Initial Contributors:
    1.14 +rem Nokia Corporation - initial contribution.
    1.15 +rem
    1.16 +rem Contributors:
    1.17 +rem
    1.18 +rem Description:
    1.19 +rem
    1.20 +
    1.21 +REM Check argument to see if epoc.ini should be created 
    1.22 +@if "%1" equ "btb" (
    1.23 +@set BTB_BUILD=@rem
    1.24 +) else (
    1.25 +@set BTB_BUILD=
    1.26 +)
    1.27 +
    1.28 +setlocal
    1.29 +
    1.30 +REM Get path to F32TEST directory
    1.31 +call :GetParentDirPath F32TEST_PATH
    1.32 +echo F32TEST_PATH = %F32TEST_PATH%
    1.33 +set EPOC32_DIR=%EPOCROOT%EPOC32\
    1.34 +echo EPOC32_DIR = %EPOC32_DIR%
    1.35 +set EMUL_MEDIA_PATH=%EPOC32_DIR%DATA\MEDIA\
    1.36 +echo EMUL_MEDIA_PATH = %EMUL_MEDIA_PATH%
    1.37 +set RELEASE_PATH=%EPOC32_DIR%RELEASE\
    1.38 +echo RELEASE_PATH = %RELEASE_PATH%
    1.39 +
    1.40 +REM If BASEPATH not set by basedoit.bat, because this is not a BTB build, then assume \os\
    1.41 +if "%BASEPATH%" == "" (
    1.42 +	set BASEPATH=\os\
    1.43 +)
    1.44 +echo BASEPATH = %BASEPATH%
    1.45 +
    1.46 +call :DoSporadic
    1.47 +call :ClearEmulMedia
    1.48 +call :SetupCDrive wins
    1.49 +call :SetupCDrive winscw
    1.50 +call :SetupZDrive wins udeb
    1.51 +call :SetupZDrive wins urel
    1.52 +call :SetupZDrive winscw udeb
    1.53 +call :SetupZDrive winscw urel
    1.54 +%BTB_BUILD% call :SetupEpocDotIni
    1.55 +
    1.56 +endlocal
    1.57 +goto :eof
    1.58 +
    1.59 +:GetParentDirPath
    1.60 +call :GetPath %1 %~p0.
    1.61 +goto :eof
    1.62 +
    1.63 +:GetPath
    1.64 +set %1=%~p2
    1.65 +goto :eof
    1.66 +
    1.67 +:DoSporadic
    1.68 +if exist \asdfasdf		rmdir /s /q \asdfasdf
    1.69 +if exist \red			rmdir /s /q \red
    1.70 +if exist \f32-tst		rmdir /s /q \f32-tst
    1.71 +if exist \ford			rmdir /s /q \ford
    1.72 +if exist \session_test	rmdir /s /q \session_test
    1.73 +if exist \tmisc			rmdir /s /q \tmisc
    1.74 +if exist \volvo			rmdir /s /q \volvo
    1.75 +if exist \blue			del /q \blue
    1.76 +goto :eof
    1.77 +
    1.78 +:ClearEmulMedia
    1.79 +if exist %EMUL_MEDIA_PATH% del /q %EMUL_MEDIA_PATH%*.bin
    1.80 +cd %EPOCROOT%
    1.81 +if exist %BASEPATH%emulator\wins\emuldrives.zip (
    1.82 +	Call unZip %BASEPATH%emulator\wins\emuldrives.zip
    1.83 +) else (
    1.84 +	Call unZip %BASEPATH%boardsupport\emulator\emulatorbsp\emuldrives.zip
    1.85 +)
    1.86 +goto :eof
    1.87 +
    1.88 +:SetupCDrive
    1.89 +if exist %EPOC32_DIR%%1\C			rmdir /s /q %EPOC32_DIR%%1\C 2>NUL
    1.90 +if not exist %EPOC32_DIR%%1\C\F32	mkdir %EPOC32_DIR%%1\C\F32
    1.91 +goto :eof
    1.92 +
    1.93 +:SetupZDrive
    1.94 +setlocal
    1.95 +set REL_DIR=%RELEASE_PATH%%1\%2
    1.96 +set EMUL_Z=%REL_DIR%\Z
    1.97 +echo REL_DIR = %REL_DIR%
    1.98 +echo EMUL_Z = %EMUL_Z%
    1.99 +
   1.100 +if exist %EMUL_Z%		rmdir /s /q %EMUL_Z% 2>NUL
   1.101 +if not exist %EMUL_Z%\NOTINPATH		mkdir %EMUL_Z%\NOTINPATH
   1.102 +if not exist %EMUL_Z%\TEST			mkdir %EMUL_Z%\TEST
   1.103 +copy %F32TEST_PATH%\SERVER\T_FILE.CPP %EMUL_Z%\TEST\T_FILE.CPP
   1.104 +copy %F32TEST_PATH%\SERVER\T_FSRV.CPP %EMUL_Z%\TEST\T_FSRV.CPP
   1.105 +copy %F32TEST_PATH%\SERVER\T_RDSECT.TXT %EMUL_Z%\TEST\T_RDSECT.TXT
   1.106 +copy %EPOC32_DIR%BUILD%F32TEST_PATH%\GROUP\%1.AUTO.BAT %EMUL_Z%\TEST\%1.AUTO.BAT
   1.107 +copy %REL_DIR%\T_CHKUID.EXE %EMUL_Z%\TEST\T_CHKUID.EXE
   1.108 +
   1.109 +REM Use both Sys and System directories until the switch has been made
   1.110 +
   1.111 +if not exist %EMUL_Z%\SYS\LIBS	mkdir %EMUL_Z%\SYS\LIBS
   1.112 +if not exist %EMUL_Z%\SYS\BIN	mkdir %EMUL_Z%\SYS\BIN
   1.113 +copy %REL_DIR%\ESHELL.EXE %EMUL_Z%\SYS\BIN\ESHELL.EXE
   1.114 +copy %REL_DIR%\T_PREL.DLL %EMUL_Z%\SYS\BIN\T_PREL.DLL
   1.115 +if not exist %EMUL_Z%\SYS\DATA	mkdir %EMUL_Z%\SYS\DATA
   1.116 +copy %F32TEST_PATH%\SERVER\PRELOAD.LST %EMUL_Z%\SYS\DATA\PRELOAD.LST
   1.117 +if exist %F32TEST_PATH%\..\EMULATOR\WINS_RESTRICTED\UNISTORE2\ESTART\ESTARTXSR.TXT (
   1.118 +	copy %F32TEST_PATH%\..\EMULATOR\WINS_RESTRICTED\UNISTORE2\ESTART\ESTARTXSR.TXT %EMUL_Z%\SYS\DATA\ESTART.TXT
   1.119 +) else (
   1.120 +	copy %BASEPATH%boardsupport\emulator\unistore2emulatorsupport\estart\estartxsr.txt %EMUL_Z%\SYS\DATA\ESTART.TXT
   1.121 +)
   1.122 +
   1.123 +if not exist %EMUL_Z%\SYSTEM\LIBS	mkdir %EMUL_Z%\SYSTEM\LIBS
   1.124 +if not exist %EMUL_Z%\SYSTEM\BIN	mkdir %EMUL_Z%\SYSTEM\BIN
   1.125 +copy %REL_DIR%\ESHELL.EXE %EMUL_Z%\SYSTEM\BIN\ESHELL.EXE
   1.126 +copy %REL_DIR%\T_PREL.DLL %EMUL_Z%\SYSTEM\BIN\T_PREL.DLL
   1.127 +if not exist %EMUL_Z%\SYSTEM\DATA	mkdir %EMUL_Z%\SYSTEM\DATA
   1.128 +copy %F32TEST_PATH%\SERVER\PRELOAD.LST %EMUL_Z%\SYSTEM\DATA\PRELOAD.LST
   1.129 +copy %F32TEST_PATH%\SERVER\corruptTest\CorruptFileNames.lst %EMUL_Z%\SYSTEM\DATA\CorruptFileNames.lst
   1.130 +copy %F32TEST_PATH%\SERVER\corruptTest\BadFile1.txt %EMUL_Z%\SYSTEM\DATA\BadFile1.txt
   1.131 +copy %F32TEST_PATH%\SERVER\corruptTest\BadFile2.txt %EMUL_Z%\SYSTEM\DATA\BadFile2.txt
   1.132 +
   1.133 +REM for T_SYSBIN
   1.134 +copy %REL_DIR%\T_SYSBIN.EXE %EMUL_Z%\SYS\BIN\T_SYSBINa.EXE
   1.135 +if not exist %EMUL_Z%\SYSTEM\PROGRAMS	mkdir %EMUL_Z%\SYSTEM\PROGRAMS
   1.136 +copy %REL_DIR%\T_SYSBIN.EXE %EMUL_Z%\SYSTEM\PROGRAMS\T_SYSBINb.EXE
   1.137 +copy %REL_DIR%\T_SYSBIN_DLL.DLL %EMUL_Z%\SYS\BIN\T_SYSBIN_DLLa.DLL
   1.138 +copy %REL_DIR%\T_SYSBIN_DLL.DLL %EMUL_Z%\SYS\BIN\T_SYSBIN_DLL_RAM.DLL
   1.139 +if not exist %EMUL_Z%\SYSTEM\LIBS	mkdir %EMUL_Z%\SYSTEM\LIBS
   1.140 +copy %REL_DIR%\T_SYSBIN_DLL.DLL %EMUL_Z%\SYSTEM\LIBS\T_SYSBIN_DLLb.DLL
   1.141 +
   1.142 +REM for T_VIRUS
   1.143 +copy %REL_DIR%\t_vshook.pxt %EMUL_Z%\Test\t_vshook.pxt
   1.144 +copy %F32TEST_PATH%\plugins\version_1\virus\virusdef.txt %EMUL_Z%\Test\virusdef.txt
   1.145 +copy %F32TEST_PATH%\plugins\version_1\virus\virus1.txt %EMUL_Z%\Test\virus1.txt
   1.146 +copy %F32TEST_PATH%\plugins\version_1\virus\virus2.txt %EMUL_Z%\Test\virus2.txt
   1.147 +copy %F32TEST_PATH%\plugins\version_1\virus\clean.txt %EMUL_Z%\Test\clean.txt
   1.148 +
   1.149 +REM for t_findcapall and t_findcapnone
   1.150 +copy %F32TEST_PATH%\SERVER\t_findcaptestfile.txt %EMUL_Z%\SYS\BIN\t_findcaptestfile.txt
   1.151 +
   1.152 +REM for T_PLUGIN_V2BETA
   1.153 +copy %REL_DIR%\t_enchook.pxt %EMUL_Z%\Test\t_enchook.pxt
   1.154 +copy %REL_DIR%\t_hexhook.pxt %EMUL_Z%\Test\t_hexhook.pxt
   1.155 +copy %REL_DIR%\t_formathook.pxt %EMUL_Z%\Test\t_formathook.pxt
   1.156 +
   1.157 +endlocal
   1.158 +goto :eof
   1.159 +
   1.160 +:SetupEpocDotIni
   1.161 +if exist %EPOCROOT%epoc32\data\epoc.ini (	
   1.162 +	echo epoc.ini already exists and hasn't been overwritten
   1.163 +	echo epoc.ini may not contain build-and-test-system settings
   1.164 +)
   1.165 +if not exist %EPOCROOT%epoc32\data\epoc.ini (
   1.166 +	REM these settings should replicate those settings 
   1.167 +	REM used for the build-and-test-system see how 
   1.168 +	REM basetests.ini gets configured in 
   1.169 +	REM //EPOC/development/base/tools/master/common/basedoit.bat
   1.170 +	echo textshell >%EPOCROOT%epoc32\data\epoc.ini
   1.171 +	echo timerresolution 1 >>%EPOCROOT%epoc32\data\epoc.ini
   1.172 +	echo _epoc_drive_t %EPOCROOT%epoc32\build>>%EPOCROOT%epoc32\data\epoc.ini
   1.173 +	echo justintime none>>%EPOCROOT%epoc32\data\epoc.ini
   1.174 +	echo debugmask panic>>%EPOCROOT%epoc32\data\epoc.ini
   1.175 +	echo logtimestamp 0 >>%EPOCROOT%epoc32\data\epoc.ini
   1.176 +	echo logthreadid 0 >>%EPOCROOT%epoc32\data\epoc.ini
   1.177 +	echo FlashEraseTime 50000 >>%EPOCROOT%epoc32\data\epoc.ini
   1.178 +	echo FlashResumeTime 0 >>%EPOCROOT%epoc32\data\epoc.ini
   1.179 +	echo FlashWriteTime 0 >>%EPOCROOT%epoc32\data\epoc.ini
   1.180 +	echo NandDriverType=XSR >>%EPOCROOT%epoc32\data\epoc.ini
   1.181 +	if exist %BASEPATH%e32\rombuild\platsec.settings (
   1.182 +		type %BASEPATH%e32\rombuild\platsec.settings >>%EPOCROOT%epoc32\data\epoc.ini
   1.183 +	) else (
   1.184 +		type %BASEPATH%kernelhwsrv\kernel\eka\rombuild\platsec.settings >>%EPOCROOT%epoc32\data\epoc.ini
   1.185 +	)
   1.186 +)
   1.187 +goto :eof