46 if not exist "%JAVA_HOME%" ( echo *** Java cannot be found & goto :errorstop ) |
46 if not exist "%JAVA_HOME%" ( echo *** Java cannot be found & goto :errorstop ) |
47 set PATH=%JAVA_HOME%\bin;%PATH% |
47 set PATH=%JAVA_HOME%\bin;%PATH% |
48 |
48 |
49 REM Needed by python logging |
49 REM Needed by python logging |
50 set PID=1 |
50 set PID=1 |
51 perl "%HELIUM_HOME%\tools\common\bin\getppid.pl" > %TEMP%\%USERNAME%pid.txt |
51 perl "%HELIUM_HOME%\tools\common\bin\getppid.pl" > "%TEMP%\%USERNAME%pid.txt" |
52 set /p PID=< %TEMP%\%USERNAME%pid.txt |
52 set /p PID=< "%TEMP%\%USERNAME%pid.txt" |
53 |
53 |
54 REM Configure Apache Ant |
54 REM Configure Apache Ant |
55 if not defined TESTED_ANT ( |
55 if not defined TESTED_ANT ( |
56 set TESTED_ANT=C:\APPS\ant_1.7 |
56 set TESTED_ANT=C:\APPS\ant_1.7 |
57 ) |
57 ) |
58 if exist "%TESTED_ANT%" (set ANT_HOME=%TESTED_ANT%) |
58 if exist "%TESTED_ANT%" (set ANT_HOME=%TESTED_ANT%) |
59 if not exist "%ANT_HOME%" ( echo *** Ant cannot be found & goto :errorstop ) |
59 if not exist "%ANT_HOME%" ( echo *** Ant cannot be found & goto :errorstop ) |
60 if not defined ANT_OPTS ( |
|
61 set ANT_OPTS=-Xmx896M -Dlog4j.configuration=com/nokia/log4j.xml |
|
62 ) |
|
63 |
60 |
64 set SIGNALING_ANT_ARGS= -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor |
61 set SIGNALING_ANT_ARGS= -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor |
65 set LOGGING_ANT_ARGS= -listener com.nokia.helium.logger.ant.listener.StatusAndLogListener |
62 set LOGGING_ANT_ARGS= -listener com.nokia.helium.logger.ant.listener.StatusAndLogListener |
66 REM -listener com.nokia.helium.logger.ant.listener.StatusAndLogListener |
|
67 set DIAMONDS_ANT_ARGS= -listener com.nokia.helium.diamonds.ant.HeliumListener |
|
68 |
63 |
69 if not defined HLM_DISABLE_INTERNAL_DATA ( |
64 if not defined HLM_DISABLE_INTERNAL_DATA ( |
70 set INTERNAL_DATA_ANT_ARGS= -listener com.nokia.helium.internaldata.ant.listener.Listener |
65 set INTERNAL_DATA_ANT_ARGS= -listener com.nokia.helium.internaldata.ant.listener.Listener |
71 echo Internal data listening enabled. |
|
72 ) |
66 ) |
73 |
67 |
74 |
68 |
75 REM Configure listener to generate target times csv file. |
69 REM Configure listener to generate target times csv file. |
76 REM **Note: Comment below line if you want to skip the target times csv file generation |
70 REM **Note: Comment below line if you want to skip the target times csv file generation |
77 set TARGET_TIMES_GENERATOR= -listener com.nokia.helium.core.ant.listener.TargetTimesLogGeneratorListener |
71 set TARGET_TIMES_GENERATOR= -listener com.nokia.helium.core.ant.listener.TargetTimesLogGeneratorListener |
78 |
72 |
79 |
73 |
80 if not defined ANT_ARGS ( |
74 if not defined ANT_ARGS ( |
81 set ANT_ARGS=-lib "%HELIUM_HOME%\external\antlibs2" -lib "%HELIUM_HOME%\extensions\nokia\external\antlibs" -logger com.nokia.ant.HeliumLogger %DIAMONDS_ANT_ARGS% %INTERNAL_DATA_ANT_ARGS% %SIGNALING_ANT_ARGS% %LOGGING_ANT_ARGS% %TARGET_TIMES_GENERATOR% |
75 set ANT_ARGS=-lib "%HELIUM_HOME%\external\antlibs2" -logger com.nokia.ant.HeliumLogger %INTERNAL_DATA_ANT_ARGS% %SIGNALING_ANT_ARGS% %LOGGING_ANT_ARGS% %TARGET_TIMES_GENERATOR% -listener com.nokia.helium.environment.ant.listener.ExecListener |
82 ) |
76 ) |
83 |
77 |
84 REM Shall we impose the EPOCROOT? |
78 REM Shall we impose the EPOCROOT? |
85 if not defined EPOCROOT ( |
79 if not defined EPOCROOT ( |
86 set EPOCROOT=\ |
80 set EPOCROOT=\ |
95 |
89 |
96 for /f "tokens=2" %%a in ('"python -V 2>&1"') do (set pythonversion=%%a) |
90 for /f "tokens=2" %%a in ('"python -V 2>&1"') do (set pythonversion=%%a) |
97 for /f "tokens=1-2 delims=." %%a in ("%pythonversion%") do (set pythonversion=%%a.%%b) |
91 for /f "tokens=1-2 delims=." %%a in ("%pythonversion%") do (set pythonversion=%%a.%%b) |
98 |
92 |
99 set PYTHONPATH=%HELIUM_HOME%\external\python\lib\auto;%HELIUM_HOME%\external\python\lib\%pythonversion% |
93 set PYTHONPATH=%HELIUM_HOME%\external\python\lib\auto;%HELIUM_HOME%\external\python\lib\%pythonversion% |
100 set PYTHONPATH=%PYTHONPATH%;%HELIUM_HOME%\external\python\lib\common;%HELIUM_HOME%\tools\common\python\scripts |
94 set PYTHONPATH=%PYTHONPATH%;%HELIUM_HOME%\external\python\lib\common |
101 set PYTHONPATH=%PYTHONPATH%;%HELIUM_HOME%\extensions\nokia\external\python\lib\%pythonversion% |
95 set PYTHONPATH=%PYTHONPATH%;%HELIUM_HOME%\extensions\nokia\external\python\lib\%pythonversion% |
102 set PYTHONPATH=%PYTHONPATH%;%HELIUM_HOME%\extensions\nokia\tools\common\python\lib;%SBS_HOME%\python |
96 set PYTHONPATH=%PYTHONPATH%;%SBS_HOME%\python |
103 set PERL5LIB=%HELIUM_HOME%\tools\common\packages |
97 set PERL5LIB=%HELIUM_HOME%\tools\common\packages |
104 set COPYCMD=/y |
98 set COPYCMD=/y |
105 |
99 |
106 REM Should be done that SYMSEE? |
100 REM Should be done that SYMSEE? |
107 set PATH=%PATH%;C:\APPS\ctc |
101 set PATH=%PATH%;C:\APPS\ctc |
127 if not defined HLM_DISABLE_TOOL_CHECK ( |
121 if not defined HLM_DISABLE_TOOL_CHECK ( |
128 if "%ERRORLEVEL%" neq "0" (goto errorstop) |
122 if "%ERRORLEVEL%" neq "0" (goto errorstop) |
129 ) |
123 ) |
130 |
124 |
131 REM Call the Helium generated batch file if it exists |
125 REM Call the Helium generated batch file if it exists |
132 REM This must match with the cache.dir property in helium.ant.xml |
|
133 if defined JOB_ID ( |
126 if defined JOB_ID ( |
134 set HELIUM_CACHE_DIR=%TEMP%\helium\%USERNAME%\%JOB_ID% |
127 set HELIUM_CACHE_DIR="%TEMP%\helium\%USERNAME%\%JOB_ID%" |
135 )ELSE set HELIUM_CACHE_DIR=%TEMP%\helium\%USERNAME% |
128 )ELSE set HELIUM_CACHE_DIR="%TEMP%\helium\%USERNAME%" |
136 |
129 |
137 if not exist %HELIUM_CACHE_DIR% ( |
130 if not exist %HELIUM_CACHE_DIR% ( |
138 md %HELIUM_CACHE_DIR% |
131 md %HELIUM_CACHE_DIR% |
139 ) |
132 ) |
140 |
133 |
141 REM pass cache dir to a property for log4j log file |
134 REM pass cache dir to a property for log4j log file |
142 if defined ANT_OPTS ( |
135 if not defined ANT_OPTS ( |
143 set ANT_OPTS=%ANT_OPTS% -Dlog4j.cache.dir=%HELIUM_CACHE_DIR% |
136 set ANT_OPTS=-Xmx896M -Dlog4j.configuration=com/nokia/log4j.xml -Dlog4j.cache.dir=%HELIUM_CACHE_DIR% -Dpython.verbose=warning |
144 call %HELIUM_HOME%\external\python\configure_jython.bat |
137 call "%HELIUM_HOME%\external\python\configure_jython.bat" |
145 ) |
138 ) |
146 |
139 |
147 call ant -Dhelium.dir="%HELIUM_HOME%" -Dcache.dir="%HELIUM_CACHE_DIR%" %* |
140 call ant -Dhelium.dir="%HELIUM_HOME%" -Dcache.dir=%HELIUM_CACHE_DIR% %* |
148 |
141 |
149 endlocal |
142 endlocal |
150 goto :eof |
143 goto :eof |
151 |
144 |
152 :errorstop |
145 :errorstop |