Add a new devserver call to locate a file in build artifact
The new call `locate_file` looks up the given file name inside specified
build artifacts. One use case is to help caller to locate an apk file
inside a build artifact.
BUG=chromium:586320
TEST=local run devserver
curl
http://127.0.0.1:8082/locate_file?file_name=sl4a.apk\&target=shamu-userdebug\&build_id=2457013\&artifacts=test_zip\&branch=git_mnc-release\&os_type=android
expected retun: DATA/priv-app/sl4a/sl4a.apk
python devserver_integration_test.py
Change-Id: Ia029aae09b9bf52670c78fe2be4ccef62283ba41
Reviewed-on: https://chromium-review.googlesource.com/327278
Commit-Ready: Dan Shi <dshi@google.com>
Tested-by: Dan Shi <dshi@google.com>
Reviewed-by: Dan Shi <dshi@google.com>
diff --git a/devserver_integration_test.py b/devserver_integration_test.py
index d37d62d..93b994c 100755
--- a/devserver_integration_test.py
+++ b/devserver_integration_test.py
@@ -152,7 +152,7 @@
"""Attempts to start devserver on |port|.
In the default case where port == 0, the server will bind to an arbitrary
- availble port. If successful, this method will set the devserver's pid
+ available port. If successful, this method will set the devserver's pid
(self.pid), actual listening port (self.port) and URL (self.devserver_url).
Raises:
@@ -418,9 +418,8 @@
"""Test that using a pidfile works correctly."""
with open(self.pidfile, 'r') as f:
pid = f.read()
-
# Let's assert some process information about the devserver.
- self.assertTrue(pid.isdigit())
+ self.assertTrue(pid.strip().isdigit())
process = psutil.Process(int(pid))
self.assertTrue(process.is_running())
self.assertTrue('devserver.py' in process.cmdline)
@@ -438,7 +437,7 @@
"""Tests core autotest workflow where we stage/update with a test payload.
"""
- build_id = 'x86-mario-release/R32-4810.0.0'
+ build_id = 'peppy-release/R50-7870.0.0'
archive_url = 'gs://chromeos-image-archive/%s' % build_id
response = self._MakeRPC(IS_STAGED, archive_url=archive_url,