[USB]
[reactos.git] / rostests / win32 / cmd / script_testsuite / run.cmd
1 ::
2 :: PROJECT: ReactOS CMD Testing Suite
3 :: LICENSE: GPL v2 or any later version
4 :: FILE: run.cmd
5 :: PURPOSE: Runs the testing scripts
6 :: COPYRIGHT: Copyright 2008 Colin Finck <mail@colinfinck.de>
7 ::
8
9 @echo off
10 cls
11 echo ReactOS CMD Testing Suite
12 echo ==========================
13 echo.
14
15 :: Preparations
16 set failed_tests=0
17 set successful_tests=0
18 set test_count=0
19
20 if exist "temp\." (
21 rmdir /s /q "temp"
22 )
23
24 mkdir "temp"
25
26 :: Run the tests
27 call :_runtest at
28 call :_runtest environment
29 call :_runtest if
30 call :_runtest redirect
31 call :_runtest set
32
33 :: Print the summary and clean up
34 echo Executed %test_count% tests, %successful_tests% successful, %failed_tests% failed
35 rmdir /s /q "temp"
36 goto :EOF
37
38 :: Functions
39 :_runtest
40 type "tests\%~1.cmd" > "temp\%~1.cmd"
41 type "lib\testlib.cmd" >> "temp\%~1.cmd"
42 call "temp\%~1.cmd"
43 goto :EOF