Commit 18a27d25 authored by Yiming Zhou's avatar Yiming Zhou Committed by Commit Bot

Fix the Chrome enterprise test to work with cached dependencies.

This means installing the chocolatey core extension package, which is a
requisite of sysinternals, and changing the python2 executable path.

Change-Id: I13e1a0b3c493540017137e70b831d12229fa6f93
Bug: 1058970
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2080082
Commit-Queue: Yiming Zhou <uwyiming@google.com>
Reviewed-by: default avatarOwen Min <zmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747398}
parent cd33553e
...@@ -11,8 +11,8 @@ python_version: "2.7" ...@@ -11,8 +11,8 @@ python_version: "2.7"
wheel: < wheel: <
name: "infra/celab/celab/windows-amd64" name: "infra/celab/celab/windows-amd64"
# Source: https://ci.chromium.org/p/celab/builders/ci/Windows/b8889176836183963376 # Source: https://ci.chromium.org/p/celab/builders/ci/Windows/b8887343739468092128
version: "ycS99QpsrTXuKI_OYOaa01_IX6jLWMhHDYGuLnAkR70C" version: "eZVniNpxV0CKdJ9K-_ooB5E4hvLmLlecU3erim2nPycC"
> >
# googleapiclient # googleapiclient
......
...@@ -133,7 +133,8 @@ class ChromeEnterpriseTestCase(EnterpriseTestCase): ...@@ -133,7 +133,8 @@ class ChromeEnterpriseTestCase(EnterpriseTestCase):
# run the test # run the test
args = subprocess.list2cmdline(args) args = subprocess.list2cmdline(args)
cmd = r'c:\Python27\python.exe %s %s' % (file_name, args) cmd = r'%s %s %s' % (self._pythonExecutablePath[instance_name], file_name,
args)
return self.RunCommand(instance_name, cmd) return self.RunCommand(instance_name, cmd)
def RunUITest(self, instance_name, test_file, timeout=300, args=[]): def RunUITest(self, instance_name, test_file, timeout=300, args=[]):
...@@ -159,9 +160,10 @@ class ChromeEnterpriseTestCase(EnterpriseTestCase): ...@@ -159,9 +160,10 @@ class ChromeEnterpriseTestCase(EnterpriseTestCase):
# get any output from stdout because the output is buffered. When this # get any output from stdout because the output is buffered. When this
# happens it makes debugging really hard. # happens it makes debugging really hard.
args = subprocess.list2cmdline(args) args = subprocess.list2cmdline(args)
ui_test_cmd = r'c:\Python27\python.exe -u %s %s' % (file_name, args) ui_test_cmd = r'%s -u %s %s' % (self._pythonExecutablePath[instance_name],
cmd = (r'python c:\cel\supporting_files\run_ui_test.py --timeout %s -- %s' file_name, args)
) % (timeout, ui_test_cmd) cmd = (r'%s c:\cel\supporting_files\run_ui_test.py --timeout %s -- %s') % (
self._pythonExecutablePath[instance_name], timeout, ui_test_cmd)
return self.RunCommand(instance_name, cmd, timeout=timeout) return self.RunCommand(instance_name, cmd, timeout=timeout)
def _generatePassword(self): def _generatePassword(self):
...@@ -181,6 +183,8 @@ class ChromeEnterpriseTestCase(EnterpriseTestCase): ...@@ -181,6 +183,8 @@ class ChromeEnterpriseTestCase(EnterpriseTestCase):
def EnableUITest(self, instance_name): def EnableUITest(self, instance_name):
"""Configures the instance so that UI tests can be run on it.""" """Configures the instance so that UI tests can be run on it."""
self.InstallWebDriver(instance_name) self.InstallWebDriver(instance_name)
self.InstallChocolateyPackage(instance_name, 'chocolatey_core_extension',
'1.3.3')
self.InstallChocolateyPackageLatest(instance_name, 'sysinternals') self.InstallChocolateyPackageLatest(instance_name, 'sysinternals')
self.InstallPipPackagesLatest(instance_name, ['pywinauto', 'requests']) self.InstallPipPackagesLatest(instance_name, ['pywinauto', 'requests'])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment