os/kernelhwsrv/kerneltest/f32test/group/wintest.bat
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
@echo off
sl@0
     2
rem
sl@0
     3
rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     4
rem All rights reserved.
sl@0
     5
rem This component and the accompanying materials are made available
sl@0
     6
rem under the terms of the License "Eclipse Public License v1.0"
sl@0
     7
rem which accompanies this distribution, and is available
sl@0
     8
rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     9
rem
sl@0
    10
rem Initial Contributors:
sl@0
    11
rem Nokia Corporation - initial contribution.
sl@0
    12
rem
sl@0
    13
rem Contributors:
sl@0
    14
rem
sl@0
    15
rem Description:
sl@0
    16
rem
sl@0
    17
sl@0
    18
REM Check argument to see if epoc.ini should be created 
sl@0
    19
@if "%1" equ "btb" (
sl@0
    20
@set BTB_BUILD=@rem
sl@0
    21
) else (
sl@0
    22
@set BTB_BUILD=
sl@0
    23
)
sl@0
    24
sl@0
    25
setlocal
sl@0
    26
sl@0
    27
REM Get path to F32TEST directory
sl@0
    28
call :GetParentDirPath F32TEST_PATH
sl@0
    29
echo F32TEST_PATH = %F32TEST_PATH%
sl@0
    30
set EPOC32_DIR=%EPOCROOT%EPOC32\
sl@0
    31
echo EPOC32_DIR = %EPOC32_DIR%
sl@0
    32
set EMUL_MEDIA_PATH=%EPOC32_DIR%DATA\MEDIA\
sl@0
    33
echo EMUL_MEDIA_PATH = %EMUL_MEDIA_PATH%
sl@0
    34
set RELEASE_PATH=%EPOC32_DIR%RELEASE\
sl@0
    35
echo RELEASE_PATH = %RELEASE_PATH%
sl@0
    36
sl@0
    37
REM If BASEPATH not set by basedoit.bat, because this is not a BTB build, then assume \os\
sl@0
    38
if "%BASEPATH%" == "" (
sl@0
    39
	set BASEPATH=\os\
sl@0
    40
)
sl@0
    41
echo BASEPATH = %BASEPATH%
sl@0
    42
sl@0
    43
call :DoSporadic
sl@0
    44
call :ClearEmulMedia
sl@0
    45
call :SetupCDrive wins
sl@0
    46
call :SetupCDrive winscw
sl@0
    47
call :SetupZDrive wins udeb
sl@0
    48
call :SetupZDrive wins urel
sl@0
    49
call :SetupZDrive winscw udeb
sl@0
    50
call :SetupZDrive winscw urel
sl@0
    51
%BTB_BUILD% call :SetupEpocDotIni
sl@0
    52
sl@0
    53
endlocal
sl@0
    54
goto :eof
sl@0
    55
sl@0
    56
:GetParentDirPath
sl@0
    57
call :GetPath %1 %~p0.
sl@0
    58
goto :eof
sl@0
    59
sl@0
    60
:GetPath
sl@0
    61
set %1=%~p2
sl@0
    62
goto :eof
sl@0
    63
sl@0
    64
:DoSporadic
sl@0
    65
if exist \asdfasdf		rmdir /s /q \asdfasdf
sl@0
    66
if exist \red			rmdir /s /q \red
sl@0
    67
if exist \f32-tst		rmdir /s /q \f32-tst
sl@0
    68
if exist \ford			rmdir /s /q \ford
sl@0
    69
if exist \session_test	rmdir /s /q \session_test
sl@0
    70
if exist \tmisc			rmdir /s /q \tmisc
sl@0
    71
if exist \volvo			rmdir /s /q \volvo
sl@0
    72
if exist \blue			del /q \blue
sl@0
    73
goto :eof
sl@0
    74
sl@0
    75
:ClearEmulMedia
sl@0
    76
if exist %EMUL_MEDIA_PATH% del /q %EMUL_MEDIA_PATH%*.bin
sl@0
    77
cd %EPOCROOT%
sl@0
    78
if exist %BASEPATH%emulator\wins\emuldrives.zip (
sl@0
    79
	Call unZip %BASEPATH%emulator\wins\emuldrives.zip
sl@0
    80
) else (
sl@0
    81
	Call unZip %BASEPATH%boardsupport\emulator\emulatorbsp\emuldrives.zip
sl@0
    82
)
sl@0
    83
goto :eof
sl@0
    84
sl@0
    85
:SetupCDrive
sl@0
    86
if exist %EPOC32_DIR%%1\C			rmdir /s /q %EPOC32_DIR%%1\C 2>NUL
sl@0
    87
if not exist %EPOC32_DIR%%1\C\F32	mkdir %EPOC32_DIR%%1\C\F32
sl@0
    88
goto :eof
sl@0
    89
sl@0
    90
:SetupZDrive
sl@0
    91
setlocal
sl@0
    92
set REL_DIR=%RELEASE_PATH%%1\%2
sl@0
    93
set EMUL_Z=%REL_DIR%\Z
sl@0
    94
echo REL_DIR = %REL_DIR%
sl@0
    95
echo EMUL_Z = %EMUL_Z%
sl@0
    96
sl@0
    97
if exist %EMUL_Z%		rmdir /s /q %EMUL_Z% 2>NUL
sl@0
    98
if not exist %EMUL_Z%\NOTINPATH		mkdir %EMUL_Z%\NOTINPATH
sl@0
    99
if not exist %EMUL_Z%\TEST			mkdir %EMUL_Z%\TEST
sl@0
   100
copy %F32TEST_PATH%\SERVER\T_FILE.CPP %EMUL_Z%\TEST\T_FILE.CPP
sl@0
   101
copy %F32TEST_PATH%\SERVER\T_FSRV.CPP %EMUL_Z%\TEST\T_FSRV.CPP
sl@0
   102
copy %F32TEST_PATH%\SERVER\T_RDSECT.TXT %EMUL_Z%\TEST\T_RDSECT.TXT
sl@0
   103
copy %EPOC32_DIR%BUILD%F32TEST_PATH%\GROUP\%1.AUTO.BAT %EMUL_Z%\TEST\%1.AUTO.BAT
sl@0
   104
copy %REL_DIR%\T_CHKUID.EXE %EMUL_Z%\TEST\T_CHKUID.EXE
sl@0
   105
sl@0
   106
REM Use both Sys and System directories until the switch has been made
sl@0
   107
sl@0
   108
if not exist %EMUL_Z%\SYS\LIBS	mkdir %EMUL_Z%\SYS\LIBS
sl@0
   109
if not exist %EMUL_Z%\SYS\BIN	mkdir %EMUL_Z%\SYS\BIN
sl@0
   110
copy %REL_DIR%\ESHELL.EXE %EMUL_Z%\SYS\BIN\ESHELL.EXE
sl@0
   111
copy %REL_DIR%\T_PREL.DLL %EMUL_Z%\SYS\BIN\T_PREL.DLL
sl@0
   112
if not exist %EMUL_Z%\SYS\DATA	mkdir %EMUL_Z%\SYS\DATA
sl@0
   113
copy %F32TEST_PATH%\SERVER\PRELOAD.LST %EMUL_Z%\SYS\DATA\PRELOAD.LST
sl@0
   114
if exist %F32TEST_PATH%\..\EMULATOR\WINS_RESTRICTED\UNISTORE2\ESTART\ESTARTXSR.TXT (
sl@0
   115
	copy %F32TEST_PATH%\..\EMULATOR\WINS_RESTRICTED\UNISTORE2\ESTART\ESTARTXSR.TXT %EMUL_Z%\SYS\DATA\ESTART.TXT
sl@0
   116
) else (
sl@0
   117
	copy %BASEPATH%boardsupport\emulator\unistore2emulatorsupport\estart\estartxsr.txt %EMUL_Z%\SYS\DATA\ESTART.TXT
sl@0
   118
)
sl@0
   119
sl@0
   120
if not exist %EMUL_Z%\SYSTEM\LIBS	mkdir %EMUL_Z%\SYSTEM\LIBS
sl@0
   121
if not exist %EMUL_Z%\SYSTEM\BIN	mkdir %EMUL_Z%\SYSTEM\BIN
sl@0
   122
copy %REL_DIR%\ESHELL.EXE %EMUL_Z%\SYSTEM\BIN\ESHELL.EXE
sl@0
   123
copy %REL_DIR%\T_PREL.DLL %EMUL_Z%\SYSTEM\BIN\T_PREL.DLL
sl@0
   124
if not exist %EMUL_Z%\SYSTEM\DATA	mkdir %EMUL_Z%\SYSTEM\DATA
sl@0
   125
copy %F32TEST_PATH%\SERVER\PRELOAD.LST %EMUL_Z%\SYSTEM\DATA\PRELOAD.LST
sl@0
   126
copy %F32TEST_PATH%\SERVER\corruptTest\CorruptFileNames.lst %EMUL_Z%\SYSTEM\DATA\CorruptFileNames.lst
sl@0
   127
copy %F32TEST_PATH%\SERVER\corruptTest\BadFile1.txt %EMUL_Z%\SYSTEM\DATA\BadFile1.txt
sl@0
   128
copy %F32TEST_PATH%\SERVER\corruptTest\BadFile2.txt %EMUL_Z%\SYSTEM\DATA\BadFile2.txt
sl@0
   129
sl@0
   130
REM for T_SYSBIN
sl@0
   131
copy %REL_DIR%\T_SYSBIN.EXE %EMUL_Z%\SYS\BIN\T_SYSBINa.EXE
sl@0
   132
if not exist %EMUL_Z%\SYSTEM\PROGRAMS	mkdir %EMUL_Z%\SYSTEM\PROGRAMS
sl@0
   133
copy %REL_DIR%\T_SYSBIN.EXE %EMUL_Z%\SYSTEM\PROGRAMS\T_SYSBINb.EXE
sl@0
   134
copy %REL_DIR%\T_SYSBIN_DLL.DLL %EMUL_Z%\SYS\BIN\T_SYSBIN_DLLa.DLL
sl@0
   135
copy %REL_DIR%\T_SYSBIN_DLL.DLL %EMUL_Z%\SYS\BIN\T_SYSBIN_DLL_RAM.DLL
sl@0
   136
if not exist %EMUL_Z%\SYSTEM\LIBS	mkdir %EMUL_Z%\SYSTEM\LIBS
sl@0
   137
copy %REL_DIR%\T_SYSBIN_DLL.DLL %EMUL_Z%\SYSTEM\LIBS\T_SYSBIN_DLLb.DLL
sl@0
   138
sl@0
   139
REM for T_VIRUS
sl@0
   140
copy %REL_DIR%\t_vshook.pxt %EMUL_Z%\Test\t_vshook.pxt
sl@0
   141
copy %F32TEST_PATH%\plugins\version_1\virus\virusdef.txt %EMUL_Z%\Test\virusdef.txt
sl@0
   142
copy %F32TEST_PATH%\plugins\version_1\virus\virus1.txt %EMUL_Z%\Test\virus1.txt
sl@0
   143
copy %F32TEST_PATH%\plugins\version_1\virus\virus2.txt %EMUL_Z%\Test\virus2.txt
sl@0
   144
copy %F32TEST_PATH%\plugins\version_1\virus\clean.txt %EMUL_Z%\Test\clean.txt
sl@0
   145
sl@0
   146
REM for t_findcapall and t_findcapnone
sl@0
   147
copy %F32TEST_PATH%\SERVER\t_findcaptestfile.txt %EMUL_Z%\SYS\BIN\t_findcaptestfile.txt
sl@0
   148
sl@0
   149
REM for T_PLUGIN_V2BETA
sl@0
   150
copy %REL_DIR%\t_enchook.pxt %EMUL_Z%\Test\t_enchook.pxt
sl@0
   151
copy %REL_DIR%\t_hexhook.pxt %EMUL_Z%\Test\t_hexhook.pxt
sl@0
   152
copy %REL_DIR%\t_formathook.pxt %EMUL_Z%\Test\t_formathook.pxt
sl@0
   153
sl@0
   154
endlocal
sl@0
   155
goto :eof
sl@0
   156
sl@0
   157
:SetupEpocDotIni
sl@0
   158
if exist %EPOCROOT%epoc32\data\epoc.ini (	
sl@0
   159
	echo epoc.ini already exists and hasn't been overwritten
sl@0
   160
	echo epoc.ini may not contain build-and-test-system settings
sl@0
   161
)
sl@0
   162
if not exist %EPOCROOT%epoc32\data\epoc.ini (
sl@0
   163
	REM these settings should replicate those settings 
sl@0
   164
	REM used for the build-and-test-system see how 
sl@0
   165
	REM basetests.ini gets configured in 
sl@0
   166
	REM //EPOC/development/base/tools/master/common/basedoit.bat
sl@0
   167
	echo textshell >%EPOCROOT%epoc32\data\epoc.ini
sl@0
   168
	echo timerresolution 1 >>%EPOCROOT%epoc32\data\epoc.ini
sl@0
   169
	echo _epoc_drive_t %EPOCROOT%epoc32\build>>%EPOCROOT%epoc32\data\epoc.ini
sl@0
   170
	echo justintime none>>%EPOCROOT%epoc32\data\epoc.ini
sl@0
   171
	echo debugmask panic>>%EPOCROOT%epoc32\data\epoc.ini
sl@0
   172
	echo logtimestamp 0 >>%EPOCROOT%epoc32\data\epoc.ini
sl@0
   173
	echo logthreadid 0 >>%EPOCROOT%epoc32\data\epoc.ini
sl@0
   174
	echo FlashEraseTime 50000 >>%EPOCROOT%epoc32\data\epoc.ini
sl@0
   175
	echo FlashResumeTime 0 >>%EPOCROOT%epoc32\data\epoc.ini
sl@0
   176
	echo FlashWriteTime 0 >>%EPOCROOT%epoc32\data\epoc.ini
sl@0
   177
	echo NandDriverType=XSR >>%EPOCROOT%epoc32\data\epoc.ini
sl@0
   178
	if exist %BASEPATH%e32\rombuild\platsec.settings (
sl@0
   179
		type %BASEPATH%e32\rombuild\platsec.settings >>%EPOCROOT%epoc32\data\epoc.ini
sl@0
   180
	) else (
sl@0
   181
		type %BASEPATH%kernelhwsrv\kernel\eka\rombuild\platsec.settings >>%EPOCROOT%epoc32\data\epoc.ini
sl@0
   182
	)
sl@0
   183
)
sl@0
   184
goto :eof