Skip to content

Commit

Permalink
Fix quic certs path in components/cronet/android/test/javaperftests/r…
Browse files Browse the repository at this point in the history
…un.py

The paths to quic certs are changed in r525466.
This CL is to update the run.py to use the new paths.

Bug: 763998
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester
Change-Id: Ia55e97118b13d2e7b56fba95c6dca8aeb6ecb3c9
Reviewed-on: https://chromium-review.googlesource.com/848078
Reviewed-by: Paul Jensen <pauljensen@chromium.org>
Commit-Queue: Helen Li <xunjieli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526720}
  • Loading branch information
xunjieli authored and Commit Bot committed Jan 3, 2018
1 parent 15ccae5 commit 178aeca
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions components/cronet/android/test/javaperftests/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
from devil.android.sdk import intent
import lighttpd_server
from pylib import constants
from pylib import pexpect
from telemetry import android
from telemetry import benchmark
from telemetry import benchmark_runner
Expand All @@ -80,9 +79,9 @@
CERT_PATH = os.path.join('net', 'data', 'ssl', 'certificates')
QUIC_CERT_DIR = os.path.join(REPOSITORY_ROOT, CERT_PATH)
QUIC_CERT_HOST = 'test.example.com'
QUIC_CERT_FILENAME = 'quic_%s.crt' % QUIC_CERT_HOST
QUIC_CERT_FILENAME = 'quic-chain.pem'
QUIC_CERT = os.path.join(QUIC_CERT_DIR, QUIC_CERT_FILENAME)
QUIC_KEY = os.path.join(QUIC_CERT_DIR, 'quic_%s.key.pkcs8' % QUIC_CERT_HOST)
QUIC_KEY = os.path.join(QUIC_CERT_DIR, 'quic-leaf-cert.key')
APP_APK = os.path.join(BUILD_DIR, 'apks', 'CronetPerfTest.apk')
APP_PACKAGE = 'org.chromium.net'
APP_ACTIVITY = '.CronetPerfTestActivity'
Expand Down Expand Up @@ -229,15 +228,13 @@ def __init__(self, quic_server_doc_root):
self._quic_server_doc_root = quic_server_doc_root

def StartupQuicServer(self, device):
# Chromium's presubmit checks aren't smart enough to understand
# the redirect done in build/android/pylib/pexpect.py.
# pylint: disable=no-member
self._process = pexpect.spawn(QUIC_SERVER,
['--quic_response_cache_dir=%s' %
self._quic_server_doc_root,
'--certificate_file=%s' % QUIC_CERT,
'--key_file=%s' % QUIC_KEY,
'--port=%d' % QUIC_PORT])
cmd = [QUIC_SERVER,
'--quic_response_cache_dir=%s' % self._quic_server_doc_root,
'--certificate_file=%s' % QUIC_CERT,
'--key_file=%s' % QUIC_KEY,
'--port=%d' % QUIC_PORT]
print "Starting Quic Server", cmd
self._process = subprocess.Popen(cmd)
assert self._process != None
# Wait for quic_server to start serving.
waited_s = 0
Expand Down

0 comments on commit 178aeca

Please sign in to comment.