@echo off

set /a count=0

call setenv.bat

echo ===================================
echo  AM62A SK Board Diagnostic Tests
echo ===================================

:loop
echo 0 Run All Tests in Loop
for /f "tokens=1,2 delims= " %%i in (ccs_test_bins.txt) do (
echo %%i %%j
)

echo.

set /p test_select=Select The Test to Run:

if 0==%test_select% (
     goto :loop_test
)else (
     goto :single_test
)

echo.
echo.

:loop_test
     call %DSS_SCRIPT_DIR%/dss.bat runDiagAutoRunTestScript.js
goto :loop

:single_test
for /f "tokens=1,2* delims= " %%i in (ccs_test_bins.txt) do (
if %%i==%test_select% (

    echo Running %%j Test Binary
    call %DSS_SCRIPT_DIR%/dss.bat runDiagTestScript.js %%j
)
)
goto :loop

pause