-
Notifications
You must be signed in to change notification settings - Fork 304
Expand file tree
/
Copy pathrun_tests.bat
More file actions
42 lines (30 loc) · 1.23 KB
/
run_tests.bat
File metadata and controls
42 lines (30 loc) · 1.23 KB
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
@echo off
setlocal enabledelayedexpansion
rem Make sure that your VS install does not have LLVM included otherwise this script will use VS clang
set TARGET_VALUES=raddbg radlink radbin mule_main mule_module torture
set CC_VALUES=msvc clang
set MODE_VALUES=debug release
rem find path to clang
for /f "tokens=*" %%i in ('where clang') do set clang_path=%%~dpi
rem parse out clang version number out of --version to build path to the folder with ASAN DLL
for /f "tokens=3 delims=. " %%v in ('clang -v 2^>^&1 ^| findstr version') do set clang_version=%%v
for %%m in (%MODE_VALUES%) do for %%c in (%CC_VALUES%) do (
setlocal
echo --------------------------------------------------------------------------------
echo Build %%c+%%m
rem nuke artifacts from last run
rmdir /s /q build\torture
if "%%c" equ "clang" (
set PATH=%clang_path%..\lib\clang\%clang_version%\lib\windows;!PATH!
)
rem clang does not compile with asan in release mode because it runs out of memory
if "%%c" equ "clang" (
call build.bat meta %%c %%m %TARGET_VALUES% || exit /b 1
) else (
call build.bat meta asan %%c %%m %TARGET_VALUES% || exit /b 1
)
pushd build
torture %* || exit /b 1
popd
endlocal
)