LDRA: Recording what you are testing with

Bit of an oversight is that its not straight forward to record what compiler and command lines are being used.

This is kind of important as in most cases you want to use the same compiler and command lines in the deployed system (in case of compiler bugs).

I have added the following to my script to record what I think should be recorded:

@REM Record Paths used in LDRA
echo ------------------------------------------------------------------ >> %LOG_FILE%
echo Record PATH in Testbed.ini to Build Environment: >> %LOG_FILE%
echo. >> %LOG_FILE%
set numbers=
for /F "delims=:" %%a in ('findstr /I /N /C:"PATH=" c:\ProgramData\LDRA\Testbed.ini') do (
   set /A before=%%a-1, current=%%a, after=%%a+1
   set "numbers=!numbers!!before!: !current!: !after!: "
)
@rem Search for the lines
(for /F "tokens=1* delims=:" %%a in ('findstr /N "^" c:\ProgramData\LDRA\Testbed.ini ^| findstr /B "%numbers%"') do echo '%%b') >> %LOG_FILE%
echo.  >> %LOG_FILE%
echo.  >> %LOG_FILE%
@REM Record the command lines used by LDRA:
echo ------------------------------------------------------------------ >> %LOG_FILE%
echo Record compiler command lines in C2000_tbrunini.dat >> %LOG_FILE%
echo.  >> %LOG_FILE%
echo.  >> %LOG_FILE%
set numbers=
for /F "delims=:" %%a in ('findstr /I /N /C:"cl2000" C:\LDRA_Toolsuite\Compiler_spec\Ticcs\C2000\C2000_tbrunini.dat') do (
   set /A before=%%a-1, current=%%a, after=%%a+1
   set "numbers=!numbers!!before!: !current!: !after!: "
)
@rem Search for the lines
(for /F "tokens=1* delims=:" %%a in ('findstr /N "^" C:\LDRA_Toolsuite\Compiler_spec\Ticcs\C2000\C2000_tbrunini.dat ^| findstr /B "%numbers%"') do echo '%%b') >> %LOG_FILE%
echo ------------------------------------------------------------------ >> %LOG_FILE%
echo.  >> %LOG_FILE%
echo.  >> %LOG_FILE%

Comments