Commit c2d8da6c authored by Eric Aleshire's avatar Eric Aleshire Committed by Commit Bot

Clean up copy_trusted_certificate debug code and test a fix.

Followup to https://chromium-review.googlesource.com/c/chromium/src/+/1308992.
From the logging, I've determined that the Keychains folder does not exist on
these simulators when they are created, which is why my original glob did not
work.

I am not sure what differs between these simulators and the ones from
testing bits of test_runner.py locally (where the glob worked), but I am
trying creating the Keychains folder first and copying the certificate, to
see if that is sufficient.

Change-Id: I676ebc109517d3bd2600d53ec2fa38d35f800c39
Reviewed-on: https://chromium-review.googlesource.com/c/1309355Reviewed-by: default avatarSergey Berezin <sergeyberezin@chromium.org>
Commit-Queue: ericale <ericale@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604357}
parent 18a40fa1
......@@ -942,23 +942,13 @@ class SimulatorTestRunner(TestRunner):
cert_path: Path to the certificate to copy to all emulators
'''
# TODO(crbug.com/892381): Remove this debug logging
print 'ERICALE copy_trusted_certificate DEBUG START'
simLocs = glob.glob(
'{}/Library/Developer/CoreSimulator/Devices/*/data/Library/'.
format(os.path.expanduser('~')))
for loc in simLocs:
print loc
print subprocess.check_output(['ls', '-lsr', loc])
print "--"
print 'ERICALE copy_trusted_certificate DEBUG END'
trustStores = glob.glob(
'{}/Library/Developer/CoreSimulator/Devices/*/data/Library'.
format(os.path.expanduser('~')))
for trustStore in trustStores:
print 'Copying TrustStore to {}'.format(trustStore)
os.makedirs(trustStore + "/Keychains/",exist_ok=True)
if not os.path.exists(trustStore + "/Keychains/"):
os.makedirs(trustStore + "/Keychains/")
shutil.copy(cert_path, trustStore + "/Keychains/TrustStore.sqlite3")
......
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