| OLD | NEW |
| (Empty) |
| 1 @ECHO OFF | |
| 2 REM Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 3 REM Use of this source code is governed by a BSD-style license that can be | |
| 4 REM found in the LICENSE file. | |
| 5 REM | |
| 6 REM Purpose of this file: If you have IE9 on your machine, not all of | |
| 7 REM the Chrome Frame tests will currently pass. To run the tests on | |
| 8 REM a VM or separate machine, you need to copy a bunch of things over | |
| 9 REM (the tests run slowly or flakily over a network drive). | |
| 10 REM | |
| 11 REM To facilitate running the tests on a separate machine, Run this | |
| 12 REM batch file on a VM or a separate machine, that has a drive mapped | |
| 13 REM to your dev machine (so that it can access your dev workspace). | |
| 14 REM | |
| 15 REM Before running this file, you need to build all the chrome_frame | |
| 16 REM targets plus chrome.dll and chrome.exe on your dev machine. Run | |
| 17 REM the copy of this file that exists in the same workspace that you | |
| 18 REM want to test. | |
| 19 REM | |
| 20 REM NOTE: I've seen cases where a Vista VM under Virtual PC will fail | |
| 21 REM to copy all of the files from the dev machine, and doing e.g. | |
| 22 REM [ dir j:\src\chrome\src\chrome\debug ] (assuming j:\src\chrome\src | |
| 23 REM is your workspace on the dev machine) shows an empty filing listing | |
| 24 REM when run from the VM, whereas your workspace actually just built | |
| 25 REM a ton of stuff in that directory. Just be aware of it, and check | |
| 26 REM what files you actually have in the local copy on the VM after | |
| 27 REM running this script. If you encounter this issue, a reboot of the | |
| 28 REM VM seems to help. | |
| 29 | |
| 30 setlocal | |
| 31 | |
| 32 REM Get the path to the build tree's src directory. | |
| 33 CALL :_canonicalize "%~dp0..\.." | |
| 34 SET FROM=%RET% | |
| 35 | |
| 36 REM Read OUTPUT and/or BUILDTYPE from command line. | |
| 37 FOR %%a IN (%1 %2) do ( | |
| 38 IF "%%a"=="out" SET OUTPUT=out | |
| 39 IF "%%a"=="build" SET OUTPUT=build | |
| 40 IF "%%a"=="Debug" SET BUILDTYPE=Debug | |
| 41 IF "%%a"=="Release" SET BUILDTYPE=Release | |
| 42 ) | |
| 43 | |
| 44 CALL :_find_build | |
| 45 IF "%OUTPUT%%BUILDTYPE%"=="" ( | |
| 46 ECHO No build found to copy. | |
| 47 EXIT 1 | |
| 48 ) | |
| 49 | |
| 50 set CLIENT_ROOT=%FROM% | |
| 51 SET INSTALL_ROOT=\trybot | |
| 52 | |
| 53 @ECHO ON | |
| 54 IF NOT EXIST "%INSTALL_ROOT%" mkdir "%INSTALL_ROOT%" | |
| 55 cd %INSTALL_ROOT% | |
| 56 rmdir /s /q base | |
| 57 rmdir /s /q %OUTPUT%\%BUILDTYPE% | |
| 58 rmdir /s /q chrome_frame | |
| 59 mkdir base | |
| 60 mkdir %OUTPUT%\%BUILDTYPE% | |
| 61 mkdir chrome_frame\test\data | |
| 62 mkdir chrome_frame\test\html_util_test_data | |
| 63 mkdir net\data | |
| 64 mkdir net\tools\testserver | |
| 65 mkdir third_party\pyftpdlib | |
| 66 mkdir third_party\pylib | |
| 67 mkdir third_party\python_26 | |
| 68 mkdir third_party\pywebsocket | |
| 69 mkdir third_party\tlslite | |
| 70 copy %CLIENT_ROOT%\base\base_paths_win.cc base\base_paths_win.cc | |
| 71 xcopy %CLIENT_ROOT%\%OUTPUT%\%BUILDTYPE% %OUTPUT%\%BUILDTYPE% /E /EXCLUDE:%CLIEN
T_ROOT%\chrome_frame\test\poor_mans_trybot_xcopy_filter.txt | |
| 72 xcopy %CLIENT_ROOT%\chrome_frame\test\data chrome_frame\test\data /E | |
| 73 xcopy %CLIENT_ROOT%\net\data net\data /E | |
| 74 xcopy %CLIENT_ROOT%\net\tools\testserver net\tools\testserver /E | |
| 75 xcopy %CLIENT_ROOT%\third_party\pyftpdlib third_party\pyftpdlib /E | |
| 76 xcopy %CLIENT_ROOT%\third_party\pylib third_party\pylib /E | |
| 77 xcopy %CLIENT_ROOT%\third_party\python_26 third_party\python_26 /E | |
| 78 xcopy %CLIENT_ROOT%\third_party\pywebsocket third_party\pywebsocket /E | |
| 79 xcopy %CLIENT_ROOT%\third_party\tlslite third_party\tlslite /E | |
| 80 xcopy %CLIENT_ROOT%\chrome_frame\test\html_util_test_data chrome_frame\test\html
_util_test_data /E | |
| 81 copy %CLIENT_ROOT%\chrome_frame\CFInstance.js chrome_frame\CFInstance.js | |
| 82 copy %CLIENT_ROOT%\chrome_frame\CFInstall.js chrome_frame\CFInstall.js | |
| 83 @ECHO OFF | |
| 84 echo ************************************ | |
| 85 echo DO THE FOLLOWING IN AN ADMIN PROMPT: | |
| 86 echo ********************************* | |
| 87 echo %INSTALL_ROOT%\%OUTPUT%\%BUILDTYPE%\chrome_frame_unittests.exe | |
| 88 echo %INSTALL_ROOT%\%OUTPUT%\%BUILDTYPE%\chrome_frame_tests.exe | |
| 89 echo %INSTALL_ROOT%\%OUTPUT%\%BUILDTYPE%\chrome_frame_net_tests.exe | |
| 90 goto end | |
| 91 | |
| 92 :usage | |
| 93 echo "Usage: poor_mans_trybot.bat [out|build] [Debug|Release]" | |
| 94 | |
| 95 :end | |
| 96 GOTO :EOF | |
| 97 | |
| 98 REM All labels henceforth are subroutines intended to be invoked by CALL. | |
| 99 | |
| 100 REM Canonicalize the first argument, returning it in RET. | |
| 101 :_canonicalize | |
| 102 SET RET=%~f1 | |
| 103 GOTO :EOF | |
| 104 | |
| 105 REM Search for a npchrome_frame.dll in the candidate build outputs. | |
| 106 :_find_build | |
| 107 IF "%OUTPUT%"=="" ( | |
| 108 SET OUTPUTS=out build | |
| 109 ) ELSE ( | |
| 110 SET OUTPUTS=%OUTPUT% | |
| 111 SET OUTPUT= | |
| 112 ) | |
| 113 | |
| 114 IF "%BUILDTYPE%"=="" ( | |
| 115 SET BUILDTYPES=Debug Release | |
| 116 ) ELSE ( | |
| 117 SET BUILDTYPES=%BUILDTYPE% | |
| 118 SET BUILDTYPE= | |
| 119 ) | |
| 120 | |
| 121 FOR %%o IN (%OUTPUTS%) DO ( | |
| 122 FOR %%f IN (%BUILDTYPES%) DO ( | |
| 123 IF EXIST "%FROM%\%%o\%%f\npchrome_frame.dll" ( | |
| 124 SET OUTPUT=%%o | |
| 125 SET BUILDTYPE=%%f | |
| 126 GOTO :EOF | |
| 127 ) | |
| 128 ) | |
| 129 ) | |
| 130 GOTO :EOF | |
| OLD | NEW |