Note that the failed builder is still expected: As you can see both builders are failing on "sink not found", which is unrelated to the script (and an improvement from the previous state).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
key_path = os.path.expanduser('~/.ssh/id_ed25519')
ssh_command = [I think this is not necessary since you are connecting from a linux host to the sender (may be mac or windows). So this command itself is always running on linux.
It's definitely not wrong though.
send_ssh_command(args.sender, args.username, download_commands,QQ, does it mean that even on windows, the sender still has the ssh-server installed?
Another question is that do you plan to manage these senders via puppet as well?
cleanup_command = (Nit, I think the pattern of SENDER_CHROMEDRIVER_CHECK_CMD is more readable 👍
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
key_path = os.path.expanduser('~/.ssh/id_ed25519')
ssh_command = [I think this is not necessary since you are connecting from a linux host to the sender (may be mac or windows). So this command itself is always running on linux.
It's definitely not wrong though.
This may or may not have fixed a transient issue with locating the .ssh key, so I'm leaving it for now although you're right that it might not be strictly necessary :P
send_ssh_command(args.sender, args.username, download_commands,QQ, does it mean that even on windows, the sender still has the ssh-server installed?
Another question is that do you plan to manage these senders via puppet as well?
Yes the sender has ssh-server installed; no, they're not managed via puppet. The only thing necessary for them is the Chrome Browser which is injected via this script, and they're not live as bots anyways
Nit, I think the pattern of SENDER_CHROMEDRIVER_CHECK_CMD is more readable 👍
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
17 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: chrome/test/media_router/performance/openscreen_cast_performance_test.py
Insertions: 23, Deletions: 17.
@@ -229,21 +229,24 @@
with urllib.request.urlopen(CFT_JSON_URL) as url:
data = json.loads(url.read().decode())
- platform = ''
- if sender_os == 'mac':
- platform = 'mac-arm64'
- elif sender_os == 'win':
- platform = 'win64'
+ platform = {
+ 'mac': (
+ 'mac-arm64'
+ ),
+ 'win': (
+ 'win64'
+ ),
+ }
for v in reversed(data['versions']):
if not version or v['version'] == version:
chrome_url = None
driver_url = None
for download in v['downloads']['chrome']:
- if download['platform'] == platform:
+ if download['platform'] == platform[sender_os]:
chrome_url = download['url']
for download in v['downloads']['chromedriver']:
- if download['platform'] == platform:
+ if download['platform'] == platform[sender_os]:
driver_url = download['url']
if chrome_url and driver_url:
logging.info("Found URLs for version %s", v['version'])
@@ -432,7 +435,9 @@
if args.sender_os == 'mac':
binary_path = (f'{remote_app_path}/Contents/MacOS/Google Chrome for '
'Testing')
- logging.info("Setting binary_location to: %s", binary_path)
+ logging.info(
+ "Mac OS detected. Setting binary_location to: %s",
+ binary_path)
elif args.sender_os == 'win':
logging.info(
"Windows OS detected. Setting binary_location to: %s",
@@ -490,14 +495,12 @@
tunnel_proc.terminate()
logging.info("Terminated tunnel.")
- if args.sender_os == 'mac':
- cleanup_command = (
+ cleanup_command = {
+ 'mac': (
f"rm -rf /tmp/chrome-mac-arm64 /tmp/chromedriver-mac-arm64 "
f"/tmp/*.zip"
- )
- elif args.sender_os == 'win':
- logging.info("Windows OS detected. Implementing cleanup.")
- cleanup_command = (
+ ),
+ 'win': (
f'powershell -Command "'
f'Remove-Item -Path C:\\Windows\\Temp\\*.zip -ErrorAction '
f'SilentlyContinue; '
@@ -509,8 +512,11 @@
f'C:\\Windows\\Temp\\chromedriver_verbose.log -ErrorAction '
f'SilentlyContinue'
f'"'
- )
- send_ssh_command(args.sender, args.username, cleanup_command)
+ ),
+ }
+
+ send_ssh_command(args.sender, args.username,
+ cleanup_command[args.sender_os])
logging.info("Cleaned up tmp files on remote machine.")
def enable_tab_mirroring(driver):
@@ -526,7 +532,7 @@
"""
driver.get(CAST_URL)
- wait = WebDriverWait(driver, 300) # Wait up to 300 seconds for the element
+ wait = WebDriverWait(driver, 300)
button = wait.until(
ec.element_to_be_clickable((By.XPATH, CAST_BTN_XPATH)))
button.click()
```
[OpenScreen] Update script to support Windows sender laptops
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |