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.
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).
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).
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
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
32 REM Get the path to the build tree's src directory.
33 CALL :_canonicalize "%~dp0..\.."
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
45 IF "%OUTPUT%%BUILDTYPE%"=="" (
46 ECHO No build found to copy.
50 set CLIENT_ROOT=%FROM%
51 SET INSTALL_ROOT=\trybot
54 IF NOT EXIST "%INSTALL_ROOT%" mkdir "%INSTALL_ROOT%"
57 rmdir /s /q %OUTPUT%\%BUILDTYPE%
58 rmdir /s /q chrome_frame
60 mkdir %OUTPUT%\%BUILDTYPE%
61 mkdir chrome_frame\test\data
62 mkdir chrome_frame\test\html_util_test_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:%CLIENT_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
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
93 echo "Usage: poor_mans_trybot.bat [out|build] [Debug|Release]"
98 REM All labels henceforth are subroutines intended to be invoked by CALL.
100 REM Canonicalize the first argument, returning it in RET.
105 REM Search for a npchrome_frame.dll in the candidate build outputs.
108 SET OUTPUTS=out build
114 IF "%BUILDTYPE%"=="" (
115 SET BUILDTYPES=Debug Release
117 SET BUILDTYPES=%BUILDTYPE%
121 FOR %%o IN (%OUTPUTS%) DO (
122 FOR %%f IN (%BUILDTYPES%) DO (
123 IF EXIST "%FROM%\%%o\%%f\npchrome_frame.dll" (