2
0

chrome_tests.bat 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. @echo off
  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
  4. :: found in the LICENSE file.
  5. setlocal
  6. set THISDIR=%~dp0
  7. set TOOL_NAME="unknown"
  8. :: Get the tool name and put it into TOOL_NAME {{{1
  9. :: NB: SHIFT command doesn't modify %*
  10. :PARSE_ARGS_LOOP
  11. if %1 == () GOTO:TOOLNAME_NOT_FOUND
  12. if %1 == --tool GOTO:TOOLNAME_FOUND
  13. SHIFT
  14. goto :PARSE_ARGS_LOOP
  15. :TOOLNAME_NOT_FOUND
  16. echo "Please specify a tool (e.g. drmemory) by using --tool flag"
  17. exit /B 1
  18. :TOOLNAME_FOUND
  19. SHIFT
  20. set TOOL_NAME=%1
  21. :: }}}
  22. if "%TOOL_NAME%" == "drmemory" GOTO :SETUP_DRMEMORY
  23. if "%TOOL_NAME%" == "drmemory_light" GOTO :SETUP_DRMEMORY
  24. if "%TOOL_NAME%" == "drmemory_full" GOTO :SETUP_DRMEMORY
  25. if "%TOOL_NAME%" == "drmemory_pattern" GOTO :SETUP_DRMEMORY
  26. echo "Unknown tool: `%TOOL_NAME%`! Only drmemory is supported right now"
  27. exit /B 1
  28. :SETUP_DRMEMORY
  29. :: Set up DRMEMORY_COMMAND to invoke Dr. Memory {{{1
  30. set DRMEMORY_PATH=%THISDIR%..\..\third_party\drmemory
  31. set DRMEMORY_SFX=%DRMEMORY_PATH%\drmemory-windows-sfx.exe
  32. if EXIST %DRMEMORY_SFX% GOTO DRMEMORY_BINARY_OK
  33. echo "Can't find Dr. Memory executables."
  34. echo "See http://www.chromium.org/developers/how-tos/using-valgrind/dr-memory"
  35. echo "for the instructions on how to get them."
  36. exit /B 1
  37. :DRMEMORY_BINARY_OK
  38. %DRMEMORY_SFX% -o%DRMEMORY_PATH%\unpacked -y
  39. set DRMEMORY_COMMAND=%DRMEMORY_PATH%\unpacked\bin\drmemory.exe
  40. :: }}}
  41. goto :RUN_TESTS
  42. :RUN_TESTS
  43. set PYTHONPATH=%THISDIR%../python/google
  44. set RUNNING_ON_VALGRIND=yes
  45. python %THISDIR%/chrome_tests.py %*