246
247 if [ -z "${core_locations}" ]
248 then
249 test_fail 4 "CHECK :: CORE_LOCATION" "output doesn't contain the location of core file, see crash.out"
250 fi
251
252 rm crash.out
253
254 # processing core locations for *nix
255 if [ $VM_OS != "windows" ]
256 then
257 # remove 'or' between '<core_path>/core.<pid>' and 'core'
258 # and the rest of line -- ' (max size ...) . To ensure a full core ...'
259 core_locations=`echo $core_locations | \
260 sed -e 's/\([^ ]*\) or \([^ ]*\).*/\1 \2/'`
261 core_with_dir=`echo $core_locations | awk '{print $1}'`
262 core_with_pid=`echo $core_locations | awk '{print $2}'`
263 dir=`dirname $core_with_dir`
264 file=`basename $core_with_dir`
265 # add <core_path>/core.<pid> core
266 core_locations="'$core_with_dir' '$file'"
267 if [ -n "${core_with_pid}" ]
268 then
269 core_locations="$core_locations '$core_with_pid' '$dir${FS}$core_with_pid'"
270 fi
271 fi
272
273 echo "LOOKING FOR CORE IN ${core_locations}"
274 for core in $core_locations
275 do
276 if [ -r "$core" ]
277 then
278 core_file=$core
279 fi
280 done
281
282 # core-file was found
283 if [ -n "$core_file" ]
284 then
285 ${MV} "${core_file}" test_core
286 core_file=test_core
287 fi
288
289 ${RM} -f hs_err_pid*.log
|
246
247 if [ -z "${core_locations}" ]
248 then
249 test_fail 4 "CHECK :: CORE_LOCATION" "output doesn't contain the location of core file, see crash.out"
250 fi
251
252 rm crash.out
253
254 # processing core locations for *nix
255 if [ $VM_OS != "windows" ]
256 then
257 # remove 'or' between '<core_path>/core.<pid>' and 'core'
258 # and the rest of line -- ' (max size ...) . To ensure a full core ...'
259 core_locations=`echo $core_locations | \
260 sed -e 's/\([^ ]*\) or \([^ ]*\).*/\1 \2/'`
261 core_with_dir=`echo $core_locations | awk '{print $1}'`
262 core_with_pid=`echo $core_locations | awk '{print $2}'`
263 dir=`dirname $core_with_dir`
264 file=`basename $core_with_dir`
265 # add <core_path>/core.<pid> core
266 core_locations='$core_with_dir' '$file'
267 if [ -n "${core_with_pid}" ]
268 then
269 core_locations=$core_locations '$core_with_pid' '$dir${FS}$core_with_pid'
270 fi
271 fi
272
273 echo "LOOKING FOR CORE IN ${core_locations}"
274 for core in $core_locations
275 do
276 if [ -r "$core" ]
277 then
278 core_file=$core
279 fi
280 done
281
282 # core-file was found
283 if [ -n "$core_file" ]
284 then
285 ${MV} "${core_file}" test_core
286 core_file=test_core
287 fi
288
289 ${RM} -f hs_err_pid*.log
|