From 70d6474255bc232ebc3e0c77dd0e7063b491619d Mon Sep 17 00:00:00 2001 From: kelvinp Date: Fri, 16 Jan 2015 12:09:49 -0800 Subject: Enable It2me Browser Test on Chromoting waterfall Summary of changes: 1. Copies the browser test JavaScript files to remoting/browser_test_resources so we can copy the entire directory on swarming bots. 2. Modifies browser_test_launcher.py to install the it2me native messaging host manifests. 3. Adds the It2meBrowserTest on to the browser_test_commands_linux.txt BUG=446342 Review URL: https://codereview.chromium.org/856653002 Cr-Commit-Position: refs/heads/master@{#311940} --- testing/chromoting/browser_tests_launcher.py | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'testing/chromoting/browser_tests_launcher.py') diff --git a/testing/chromoting/browser_tests_launcher.py b/testing/chromoting/browser_tests_launcher.py index be66955..dab4c97 100644 --- a/testing/chromoting/browser_tests_launcher.py +++ b/testing/chromoting/browser_tests_launcher.py @@ -80,7 +80,8 @@ def TestCleanUp(user_profile_dir): shutil.rmtree(user_profile_dir) -def InitialiseTestMachineForLinux(cfg_file, manifest_file, user_profile_dir): +def InitialiseTestMachineForLinux(cfg_file, me2me_manifest_file, + it2me_manifest_file, user_profile_dir): """Sets up a Linux machine for connect-to-host browser-tests. Copy over me2me host-config and manifest files to expected locations. @@ -89,8 +90,8 @@ def InitialiseTestMachineForLinux(cfg_file, manifest_file, user_profile_dir): Its name is expected to have a hash that is specific to a machine. When a user launches the remoting web-app, the native-message host process is - started. For this to work, the manifest file for me2me host is expected to be - in a specific folder under the user-profile dir. + started. For this to work, the manifest file for me2me host and it2me host is + expected to be in a specific folder under the user-profile dir. This function performs both the above tasks. @@ -102,7 +103,8 @@ def InitialiseTestMachineForLinux(cfg_file, manifest_file, user_profile_dir): Args: cfg_file: location of test account's host-config file. - manifest_file: location of me2me host manifest file. + me2me_manifest_file: location of me2me host manifest file. + it2me_manifest_file: location of it2me host manifest file. user_profile_dir: user-profile-dir to be used by the connect-to-host tests. """ @@ -129,10 +131,12 @@ def InitialiseTestMachineForLinux(cfg_file, manifest_file, user_profile_dir): shutil.rmtree(user_profile_dir) os.makedirs(native_messaging_folder) - manifest_file_src = os.path.join(os.getcwd(), manifest_file) - manifest_file_dest = ( - os.path.join(native_messaging_folder, os.path.basename(manifest_file))) - shutil.copyfile(manifest_file_src, manifest_file_dest) + manifest_files = [me2me_manifest_file, it2me_manifest_file] + for manifest_file in manifest_files: + manifest_file_src = os.path.join(os.getcwd(), manifest_file) + manifest_file_dest = ( + os.path.join(native_messaging_folder, os.path.basename(manifest_file))) + shutil.copyfile(manifest_file_src, manifest_file_dest) # Finally, start chromoting host. RunCommandInSubProcess(CHROMOTING_HOST_PATH + ' --start') @@ -146,16 +150,18 @@ def main(): help='path to folder having product and test binaries.') parser.add_argument('-c', '--cfg_file', help='path to test host config file.') - parser.add_argument('-m', '--manifest_file', + parser.add_argument('--me2me_manifest_file', help='path to me2me host manifest file.') + parser.add_argument('--it2me_manifest_file', + help='path to it2me host manifest file.') parser.add_argument( '-u', '--user_profile_dir', help='path to user-profile-dir, used by connect-to-host tests.') args = parser.parse_args() - InitialiseTestMachineForLinux(args.cfg_file, args.manifest_file, - args.user_profile_dir) + InitialiseTestMachineForLinux(args.cfg_file, args.me2me_manifest_file, + args.it2me_manifest_file, args.user_profile_dir) with open(args.commands_file) as f: for line in f: -- cgit v1.1