-
Notifications
You must be signed in to change notification settings - Fork 1
/
Test.cmd
82 lines (63 loc) · 1.97 KB
/
Test.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
@echo off
rem Author KMS - Martin Dubois, P.Eng.
rem Copyright (C) 2021 KMS
rem Product EthCAN
rem File Test.cmd
echo Executing Test.cmd ...
rem ===== Initialization ====================================================
set BASE_TXT="EthCAN_Tool\Tests\Base.txt"
set FIRMWARE1_BASE_TXT="Firmware1_Tool\Tests\Base.txt"
set DEBUG=x64\Debug
set RELEASE=x64\Release
rem ===== Verification ======================================================
if not exist "%DEBUG%" (
echo FATAL ERROR "%DEBUG%" does not exist
echo Compile the product
pause
exit /B 10
)
if not exist "%RELEASE%" (
echo FATAL ERROR "%RELEASE%" does not exist
echo Compile the product
pause
exit /B 20
)
rem ===== Execution =========================================================
%DEBUG%\EthCAN_Lib_Test.exe
if ERRORLEVEL 1 (
echo ERROR %DEBUG%\EthCAN_Lib_Test.exe failed - %ERRORLEVEL%
pause
exit /B 30
)
%DEBUG%\EthCAN_Tool.exe "Execute=ExecuteScript %BASE_TXT%"
if ERRORLEVEL 1 (
echo ERROR %DEBUG%\EthCAN_Tool.exe "Execute=ExecuteScript %BASE_TXT%" failed - %ERRORLEVEL%
pause
exit /B 40
)
%DEBUG%\Firmware1_Tool.exe "Execute=ExecuteScript %FIRMWARE1_BASE_TXT%"
if ERRORLEVEL 1 (
echo ERROR %DEBUG%\Firmware1_Tool.exe "Execute=ExecuteScript %FIRMWARE1_BASE_TXT%" failed - %ERRORLEVEL%
pause
exit /B 45
)
%RELEASE%\EthCAN_Lib_Test.exe
if ERRORLEVEL 1 (
echo ERROR %RELEASE%\EthCAN_Lib_Test.exe failed - %ERRORLEVEL%
pause
exit /B 50
)
%RELEASE%\EthCAN_Tool.exe "Execute=ExecuteScript %BASE_TXT%"
if ERRORLEVEL 1 (
echo ERROR %RELEASE%\EthCAN_Tool.exe "Execute=ExecuteScript %BASE_TXT%" failed - %ERRORLEVEL%
pause
exit /B 60
)
%RELEASE%\Firmware1_Tool.exe "Execute=ExecuteScript %FIRMWARE1_BASE_TXT%"
if ERRORLEVEL 1 (
echo ERROR %RELEASE%\Firmware1_Tool.exe "Execute=ExecuteScript %FIRMWARE1_BASE_TXT%" failed - %ERRORLEVEL%
pause
exit /B 70
)
rem ===== End ===============================================================
echo OK