@echo off

set CHECK_DEBUG_LEVEL=2
set CLEAN_DEBUG_LEVEL=0
set SETUP_DEBUG_LEVEL=0

set TEST_HARNESS=..\..\..\..\..\utils\test_harness

set PROGRAM=build\webjob.exe
if not exist "%PROGRAM%" goto :next_test
set TARGET_PROGRAM=..\..\..\..\..\%PROGRAM%
cd tests\webjob\common\hashsum\test_1
perl %TEST_HARNESS% -p %TARGET_PROGRAM% -m clean -d %CLEAN_DEBUG_LEVEL%
perl %TEST_HARNESS% -p %TARGET_PROGRAM% -m setup -d %SETUP_DEBUG_LEVEL%
perl %TEST_HARNESS% -p %TARGET_PROGRAM% -m check -d %CHECK_DEBUG_LEVEL%
perl %TEST_HARNESS% -p %TARGET_PROGRAM% -m clean -d %CLEAN_DEBUG_LEVEL%
cd ..\test_2
perl %TEST_HARNESS% -p %TARGET_PROGRAM% -m clean -d %CLEAN_DEBUG_LEVEL%
perl %TEST_HARNESS% -p %TARGET_PROGRAM% -m setup -d %SETUP_DEBUG_LEVEL%
perl %TEST_HARNESS% -p %TARGET_PROGRAM% -m check -d %CHECK_DEBUG_LEVEL%
perl %TEST_HARNESS% -p %TARGET_PROGRAM% -m clean -d %CLEAN_DEBUG_LEVEL%
cd ..\test_3
perl %TEST_HARNESS% -p %TARGET_PROGRAM% -m clean -d %CLEAN_DEBUG_LEVEL%
perl %TEST_HARNESS% -p %TARGET_PROGRAM% -m setup -d %SETUP_DEBUG_LEVEL%
perl %TEST_HARNESS% -p %TARGET_PROGRAM% -m check -d %CHECK_DEBUG_LEVEL%
perl %TEST_HARNESS% -p %TARGET_PROGRAM% -m clean -d %CLEAN_DEBUG_LEVEL%
cd ..\..\..\..\..
:next_test

set PROGRAM=tools\webjob-dsvtool\build\webjob-dsvtool.exe
if not exist "%PROGRAM%" goto :next_test
set TARGET_PROGRAM=..\..\..\..\..\%PROGRAM%
cd tests\webjob-dsvtool\common\sign\test_1
perl %TEST_HARNESS% -p %TARGET_PROGRAM% -m clean -d %CLEAN_DEBUG_LEVEL%
perl %TEST_HARNESS% -p %TARGET_PROGRAM% -m setup -d %SETUP_DEBUG_LEVEL%
perl %TEST_HARNESS% -p %TARGET_PROGRAM% -m check -d %CHECK_DEBUG_LEVEL%
perl %TEST_HARNESS% -p %TARGET_PROGRAM% -m clean -d %CLEAN_DEBUG_LEVEL%
cd ..\..\verify\test_1
perl %TEST_HARNESS% -p %TARGET_PROGRAM% -m clean -d %CLEAN_DEBUG_LEVEL%
perl %TEST_HARNESS% -p %TARGET_PROGRAM% -m setup -d %SETUP_DEBUG_LEVEL%
perl %TEST_HARNESS% -p %TARGET_PROGRAM% -m check -d %CHECK_DEBUG_LEVEL%
perl %TEST_HARNESS% -p %TARGET_PROGRAM% -m clean -d %CLEAN_DEBUG_LEVEL%
cd ..\..\..\..\..
:next_test
