OLD | NEW |
---|---|
1 @echo off | 1 @echo off |
2 :: Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 :: Copyright (c) 2011 The Chromium Authors. All rights reserved. |
3 :: Use of this source code is governed by a BSD-style license that can be | 3 :: Use of this source code is governed by a BSD-style license that can be |
4 :: found in the LICENSE file. | 4 :: found in the LICENSE file. |
5 | 5 |
6 :: TODO(timurrrr): batch files 'export' all the variables to the parent shell | 6 setlocal |
7 | |
7 set THISDIR=%~dp0 | 8 set THISDIR=%~dp0 |
8 set TOOL_NAME="unknown" | 9 set TOOL_NAME="unknown" |
9 | 10 |
10 :: Get the tool name and put it into TOOL_NAME {{{1 | 11 :: Get the tool name and put it into TOOL_NAME {{{1 |
11 :: NB: SHIFT command doesn't modify %* | 12 :: NB: SHIFT command doesn't modify %* |
12 :PARSE_ARGS_LOOP | 13 :PARSE_ARGS_LOOP |
13 if %1 == () GOTO:TOOLNAME_NOT_FOUND | 14 if %1 == () GOTO:TOOLNAME_NOT_FOUND |
14 if %1 == --tool GOTO:TOOLNAME_FOUND | 15 if %1 == --tool GOTO:TOOLNAME_FOUND |
15 SHIFT | 16 SHIFT |
16 goto :PARSE_ARGS_LOOP | 17 goto :PARSE_ARGS_LOOP |
17 | 18 |
18 :TOOLNAME_NOT_FOUND | 19 :TOOLNAME_NOT_FOUND |
19 echo "Please specify a tool (tsan or drmemory) by using --tool flag" | 20 echo "Please specify a tool (tsan or drmemory) by using --tool flag" |
20 exit /B 1 | 21 exit /B 1 |
21 | 22 |
22 :TOOLNAME_FOUND | 23 :TOOLNAME_FOUND |
23 SHIFT | 24 SHIFT |
24 set TOOL_NAME=%1 | 25 set TOOL_NAME=%1 |
25 :: }}} | 26 :: }}} |
26 if "%TOOL_NAME%" == "drmemory" GOTO :SETUP_DRMEMORY | 27 if "%TOOL_NAME%" == "drmemory" GOTO :SETUP_DRMEMORY |
27 if "%TOOL_NAME%" == "drmemory_light" GOTO :SETUP_DRMEMORY | 28 if "%TOOL_NAME%" == "drmemory_light" GOTO :SETUP_DRMEMORY |
28 if "%TOOL_NAME%" == "drmemory_full" GOTO :SETUP_DRMEMORY | 29 if "%TOOL_NAME%" == "drmemory_full" GOTO :SETUP_DRMEMORY |
29 if "%TOOL_NAME%" == "drmemory_pattern" GOTO :SETUP_DRMEMORY | 30 if "%TOOL_NAME%" == "drmemory_pattern" GOTO :SETUP_DRMEMORY |
30 if "%TOOL_NAME%" == "tsan" GOTO :SETUP_TSAN | 31 if "%TOOL_NAME%" == "tsan" GOTO :SETUP_TSAN |
31 echo "Unknown tool: `%TOOL_NAME%`! Only tsan and drmemory are supported right no w" | 32 echo "Unknown tool: `%TOOL_NAME%`! Only tsan and drmemory are supported right no w" |
32 exit /B 1 | 33 exit /B 1 |
33 | 34 |
34 :SETUP_DRMEMORY | 35 :SETUP_DRMEMORY |
35 if NOT "%DRMEMORY_COMMAND%"=="" GOTO :RUN_TESTS | |
the_wrong_timurrrr_2
2016/03/18 15:23:50
No, you shouldn't remove this line.
This line is v
| |
36 :: Set up DRMEMORY_COMMAND to invoke Dr. Memory {{{1 | 36 :: Set up DRMEMORY_COMMAND to invoke Dr. Memory {{{1 |
37 set DRMEMORY_PATH=%THISDIR%..\..\third_party\drmemory | 37 set DRMEMORY_PATH=%THISDIR%..\..\third_party\drmemory |
38 set DRMEMORY_SFX=%DRMEMORY_PATH%\drmemory-windows-sfx.exe | 38 set DRMEMORY_SFX=%DRMEMORY_PATH%\drmemory-windows-sfx.exe |
39 if EXIST %DRMEMORY_SFX% GOTO DRMEMORY_BINARY_OK | 39 if EXIST %DRMEMORY_SFX% GOTO DRMEMORY_BINARY_OK |
40 echo "Can't find Dr. Memory executables." | 40 echo "Can't find Dr. Memory executables." |
41 echo "See http://www.chromium.org/developers/how-tos/using-valgrind/dr-memory" | 41 echo "See http://www.chromium.org/developers/how-tos/using-valgrind/dr-memory" |
42 echo "for the instructions on how to get them." | 42 echo "for the instructions on how to get them." |
43 exit /B 1 | 43 exit /B 1 |
44 | 44 |
45 :DRMEMORY_BINARY_OK | 45 :DRMEMORY_BINARY_OK |
(...skipping 15 matching lines...) Expand all Loading... | |
61 :TSAN_BINARY_OK | 61 :TSAN_BINARY_OK |
62 %TSAN_SFX% -o%TSAN_PATH%\unpacked -y | 62 %TSAN_SFX% -o%TSAN_PATH%\unpacked -y |
63 set PIN_COMMAND=%TSAN_PATH%\unpacked\tsan-x86-windows\tsan.bat | 63 set PIN_COMMAND=%TSAN_PATH%\unpacked\tsan-x86-windows\tsan.bat |
64 :: }}} | 64 :: }}} |
65 goto :RUN_TESTS | 65 goto :RUN_TESTS |
66 | 66 |
67 :RUN_TESTS | 67 :RUN_TESTS |
68 set PYTHONPATH=%THISDIR%../python/google | 68 set PYTHONPATH=%THISDIR%../python/google |
69 set RUNNING_ON_VALGRIND=yes | 69 set RUNNING_ON_VALGRIND=yes |
70 python %THISDIR%/chrome_tests.py %* | 70 python %THISDIR%/chrome_tests.py %* |
OLD | NEW |