xref: /aosp_15_r20/external/bc/vs/tests/tests_dc.bat (revision 5a6e848804d15c18a0125914844ee4eb0bda4fcf)
1*5a6e8488SAndroid Build Coastguard Worker@echo off
2*5a6e8488SAndroid Build Coastguard Worker
3*5a6e8488SAndroid Build Coastguard Workerset scripts=..\..\tests\dc
4*5a6e8488SAndroid Build Coastguard Workerset dc=%~dp0\dc.exe
5*5a6e8488SAndroid Build Coastguard Workerset args=-x
6*5a6e8488SAndroid Build Coastguard Worker
7*5a6e8488SAndroid Build Coastguard Workerdel /f /q *.txt > NUL
8*5a6e8488SAndroid Build Coastguard Worker
9*5a6e8488SAndroid Build Coastguard Worker
10*5a6e8488SAndroid Build Coastguard Workerrem excluded: all, errors, read_errors
11*5a6e8488SAndroid Build Coastguard Worker
12*5a6e8488SAndroid Build Coastguard Workerfor %%i in (
13*5a6e8488SAndroid Build Coastguard Workerabs
14*5a6e8488SAndroid Build Coastguard Workeradd
15*5a6e8488SAndroid Build Coastguard Workerboolean
16*5a6e8488SAndroid Build Coastguard Workerdecimal
17*5a6e8488SAndroid Build Coastguard Workerdivide
18*5a6e8488SAndroid Build Coastguard Workerdivmod
19*5a6e8488SAndroid Build Coastguard Workerengineering
20*5a6e8488SAndroid Build Coastguard Workerexec_stack_len
21*5a6e8488SAndroid Build Coastguard Workerlength
22*5a6e8488SAndroid Build Coastguard Workermisc
23*5a6e8488SAndroid Build Coastguard Workermodexp
24*5a6e8488SAndroid Build Coastguard Workermodulus
25*5a6e8488SAndroid Build Coastguard Workermultiply
26*5a6e8488SAndroid Build Coastguard Workernegate
27*5a6e8488SAndroid Build Coastguard Workerplaces
28*5a6e8488SAndroid Build Coastguard Workerpower
29*5a6e8488SAndroid Build Coastguard Workerrand
30*5a6e8488SAndroid Build Coastguard Workerread
31*5a6e8488SAndroid Build Coastguard Workerscientific
32*5a6e8488SAndroid Build Coastguard Workershift
33*5a6e8488SAndroid Build Coastguard Workersqrt
34*5a6e8488SAndroid Build Coastguard Workerstack_len
35*5a6e8488SAndroid Build Coastguard Workerstdin
36*5a6e8488SAndroid Build Coastguard Workerstrings
37*5a6e8488SAndroid Build Coastguard Workersubtract
38*5a6e8488SAndroid Build Coastguard Workertrunc
39*5a6e8488SAndroid Build Coastguard Workervars
40*5a6e8488SAndroid Build Coastguard Worker) do (
41*5a6e8488SAndroid Build Coastguard Workerif exist "%scripts%\%%i.txt" (
42*5a6e8488SAndroid Build Coastguard Worker	"%dc%" "%args%" < "%scripts%\%%i.txt" > "%%i_results.txt"
43*5a6e8488SAndroid Build Coastguard Worker
44*5a6e8488SAndroid Build Coastguard Worker	if errorlevel 1 (
45*5a6e8488SAndroid Build Coastguard Worker		echo FAIL_RUNTIME: %%i
46*5a6e8488SAndroid Build Coastguard Worker		goto :eof
47*5a6e8488SAndroid Build Coastguard Worker	)
48*5a6e8488SAndroid Build Coastguard Worker
49*5a6e8488SAndroid Build Coastguard Worker	fc.exe "%scripts%\%%i_results.txt" "%%i_results.txt" > NUL
50*5a6e8488SAndroid Build Coastguard Worker
51*5a6e8488SAndroid Build Coastguard Worker	if errorlevel 1 (
52*5a6e8488SAndroid Build Coastguard Worker		echo FAIL_RESULTS: %%i
53*5a6e8488SAndroid Build Coastguard Worker		goto :eof
54*5a6e8488SAndroid Build Coastguard Worker	)
55*5a6e8488SAndroid Build Coastguard Worker
56*5a6e8488SAndroid Build Coastguard Worker	echo PASS: %%i
57*5a6e8488SAndroid Build Coastguard Worker) else (
58*5a6e8488SAndroid Build Coastguard Worker	echo FAIL_NOT_EXIST: %%i
59*5a6e8488SAndroid Build Coastguard Worker	goto :eof
60*5a6e8488SAndroid Build Coastguard Worker)
61*5a6e8488SAndroid Build Coastguard Worker)