From 84d3ea8e8bd1eca0c3ffa0180cddde3efa820b20 Mon Sep 17 00:00:00 2001 From: Scott Wegner Date: Mon, 21 Apr 2008 12:33:23 -0500 Subject: [svn-r14855] Purpose: Fix error message when with Windows pthreads Description: When building HDF5 with thread safety on Windows, the err_compat test was failing because our output was being parsed incorrectly. Rather than having a thread number in the error stack trace, there will be the string "some thread: no way to know the thread (IDs): from pthread on windows:". This checkin now takes this into account, and modifies the output accordingly. Tested: VS2005 on WinXP with Pthreads --- windows/test/testerror.bat | 58 +++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/windows/test/testerror.bat b/windows/test/testerror.bat index 7204d99..844e69c 100644 --- a/windows/test/testerror.bat +++ b/windows/test/testerror.bat @@ -88,25 +88,40 @@ rem if not "!line_tmp:~0,9!"=="*********" ( set line= set last_token= + set skip= for %%b in (%%a) do ( - if "!last_token!"=="thread" ( - set line=!line! ^(IDs^): - ) else if "!last_token:~0,2!"=="#0" ( - set line=!line! ^(file name^) - ) else if "!last_token!"=="HDF5" ( - rem Check if we wrap parenthesis around "version (number)" - set version_token=%%b - if "!version_token:~0,1!"=="(" ( - set line=!line! ^(version ^(number^)^) - ) else ( - set line=!line! version ^(number^). + if not defined skip ( + if "!last_token!"=="thread" ( + set line=!line! ^(IDs^): + + ) else if "!last_token!"=="some" ( + if "%%b"=="thread:" ( + set line=!line! thread ^(IDs^): + set skip=yes + ) else ( + set line=!line! some %%b + ) + + ) else if "!last_token:~0,2!"=="#0" ( + set line=!line! ^(file name^) + + ) else if "!last_token!"=="HDF5" ( + rem Check if we wrap parenthesis around "version (number)" + set version_token=%%b + if "!version_token:~0,1!"=="(" ( + set line=!line! ^(version ^(number^)^) + ) else ( + set line=!line! version ^(number^). + ) + + ) else if "!last_token!"=="line" ( + set line=!line! ^(number^) + + ) else if not "%%b"=="some" ( + set line=!line! %%b ) - ) else if "!last_token!"=="line" ( - set line=!line! ^(number^) - ) else ( - set line=!line! %%b + set last_token=%%b ) - set last_token=%%b ) echo.!line!>>%actual_ext% ) @@ -129,17 +144,6 @@ rem ) ) ) - type nul > %expect2_parsed% - for /f "delims=" %%a in (%expect2%) do ( - set line_tmp=%%a - if not "!line_tmp:~0,9!"=="*********" ( - set line= - for %%b in (%%a) do ( - set line=!line! %%b - ) - echo.!line!>>%expect2_parsed% - ) - ) fc /w %expect1_parsed% %actual% > nul if %errorlevel% equ 0 ( -- cgit v0.12