-
Notifications
You must be signed in to change notification settings - Fork 148
/
test.cmd
69 lines (63 loc) · 2.04 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
@echo off
setlocal
set __DBG=
set __ME=%~dp0
set __CPU=x64
set __FLAVOR=debug
:arg
if x%1x == x?x goto :usage
if x%1x == x/?x goto :usage
if x%1x == x-?x goto :usage
if x%1x == x/hx goto :usage
if x%1x == x-hx goto :usage
if x%1x == x/helpx goto :usage
if x%1x == x--helpx goto :usage
if x%1x == xhelpx goto :usage
if x%1x == x/x64x set __CPU=x64& goto :nextarg
if x%1x == x--x64x set __CPU=x64& goto :nextarg
if x%1x == x/x86x set __CPU=x86& goto :nextarg
if x%1x == x--x86x set __CPU=x86& goto :nextarg
if x%1x == x/dbgx set __DBG=call devenv /debugexe& goto:nextarg
if x%1x == x--dbgx set __DBG=call devenv /debugexe& goto:nextarg
if x%1x == x/relx set __FLAVOR=release& goto:nextarg
if x%1x == x--relx set __FLAVOR=release& goto:nextarg
if x%1x == x/releasex set __FLAVOR=release& goto:nextarg
if x%1x == x--releasex set __FLAVOR=release& goto:nextarg
if x%1x == x/shipx set __FLAVOR=release& goto:nextarg
if x%1x == x--shipx set __FLAVOR=release& goto:nextarg
if x%2x == x/relx goto:oopsflag
if x%2x == x-relx goto:oopsflag
if x%2x == x/releasex goto:oopsflag
if x%2x == x--releasex goto:oopsflag
if x%2x == x/shipx goto:oopsflag
if x%2x == x--shipx goto:oopsflag
echo %__DBG% %__ME%.build\vs2022\bin\%__FLAVOR%\clink_test_%__CPU%.exe %1 %2 %3
%__DBG% %__ME%.build\vs2022\bin\%__FLAVOR%\clink_test_%__CPU%.exe %1 %2 %3
goto :eof
:nextarg
shift
goto :arg
:oopsflag
echo Options in wrong order; %2 belongs before %1.
goto :eof
:usage
echo Usage: test [options1] [options2] [test name prefix]
echo.
echo Run clink_test_x64.exe.
echo.
echo Script options:
echo. /? Show usage info.
echo /dbg Run test under the debugger.
echo /x64 Run clink_test_x64.exe (the default).
echo /x86 Run clink_test_x86.exe.
echo /rel Run release version (runs debug version by default).
echo.
echo Test options:
echo -d Load Lua debugger.
echo -t Show execution time.
echo.
echo Script options must precede test options.
echo.
echo If [test name prefix] is included, then it only runs tests whose name begins
echo with the specified prefix.
goto :eof