Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1326)

Unified Diff: tools/valgrind/chrome_tests.bat

Issue 8775047: Add support for overridable DRMEMORY_COMMAND in tools/valgrind/chrome_tests.bat (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/valgrind/chrome_tests.bat
===================================================================
--- tools/valgrind/chrome_tests.bat (revision 112663)
+++ tools/valgrind/chrome_tests.bat (working copy)
@@ -3,6 +3,7 @@
:: Use of this source code is governed by a BSD-style license that can be
:: found in the LICENSE file.
+:: TODO(timurrrr): batch files 'export' all the variables to the parent shell
set THISDIR=%~dp0
set TOOL_NAME="unknown"
@@ -16,22 +17,21 @@
:TOOLNAME_NOT_FOUND
echo "Please specify a tool (tsan or drmemory) by using --tool flag"
-set %ERRORLEVEL% 1
-goto :EOF
+exit /B 1
:TOOLNAME_FOUND
SHIFT
set TOOL_NAME=%1
:: }}}
-if %TOOL_NAME% == drmemory GOTO :SETUP_DRMEMORY
-if %TOOL_NAME% == drmemory_light GOTO :SETUP_DRMEMORY
-if %TOOL_NAME% == drmemory_full GOTO :SETUP_DRMEMORY
-if %TOOL_NAME% == tsan GOTO :SETUP_TSAN
-echo "Unknown tool: %TOOL_NAME%! Only tsan and drmemory are supported right now"
-set %ERRORLEVEL% 1
-goto :EOF
+if "%TOOL_NAME%" == "drmemory" GOTO :SETUP_DRMEMORY
+if "%TOOL_NAME%" == "drmemory_light" GOTO :SETUP_DRMEMORY
+if "%TOOL_NAME%" == "drmemory_full" GOTO :SETUP_DRMEMORY
+if "%TOOL_NAME%" == "tsan" GOTO :SETUP_TSAN
+echo "Unknown tool: `%TOOL_NAME%`! Only tsan and drmemory are supported right now"
+exit /B 1
:SETUP_DRMEMORY
+if NOT "%DRMEMORY_COMMAND%"=="" GOTO :RUN_TESTS
:: Set up DRMEMORY_COMMAND to invoke Dr. Memory {{{1
set DRMEMORY_PATH=%THISDIR%..\..\third_party\drmemory
set DRMEMORY_SFX=%DRMEMORY_PATH%\drmemory-windows-sfx.exe
@@ -39,8 +39,7 @@
echo "Can't find Dr. Memory executables."
echo "See http://www.chromium.org/developers/how-tos/using-valgrind/dr-memory"
echo "for the instructions on how to get them."
-set %ERRORLEVEL% 1
-goto :EOF
+exit /B 1
:DRMEMORY_BINARY_OK
%DRMEMORY_SFX% -o%DRMEMORY_PATH%\unpacked -y
@@ -56,8 +55,7 @@
echo "Can't find ThreadSanitizer executables."
echo "See http://www.chromium.org/developers/how-tos/using-valgrind/threadsanitizer/threadsanitizer-on-windows"
echo "for the instructions on how to get them."
-set %ERRORLEVEL% 1
-goto :EOF
+exit /B 1
:TSAN_BINARY_OK
%TSAN_SFX% -o%TSAN_PATH%\unpacked -y
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698