New issue
Advanced search Search tips

Issue 916031 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Dec 29
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Feature



Sign in to add a comment

Tast should support using proxy to download test data files

Project Member Reported by derat@chromium.org, Dec 18

Issue description

Per https://groups.google.com/a/chromium.org/forum/#!topic/tast-users/7Y9iqzc6zGk, local_test_runner should support using a proxy to download external data files.

It sounds like we might want to make the test process call http.ProxyFromEnvironment and then pass the proxy information through to local_test_runner.

Alternately, we could just pass $HTTP_PROXY, $HTTPS_PROXY and $NO_PROXY (and lowercase variants) and set them when running local_test_runner and then make *it* call http.ProxyFromEnvironment. 
 
The latter way sounds more elegant; that is, to add an option to pass through environment variables to local_test_runner.

Status: Started (was: Untriaged)
This seems pretty simple.
Uploaded a potential fix at https://crrev.com/c/1382648.
Project Member

Comment 4 by bugdroid1@chromium.org, Dec 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast/+/de50149b9b19ff4c1a1eccdee82599589f5cca28

commit de50149b9b19ff4c1a1eccdee82599589f5cca28
Author: Daniel Erat <derat@chromium.org>
Date: Fri Dec 28 21:01:25 2018

tast: Pass proxy-related env vars to local_test_runner.

Make "tast run" forward the HTTP_PROXY, HTTPS_PROXY, and
NO_PROXY environment variables (and their lowercase
equivalents) to local_tast_runner.

Also make local_tast_runner call http.ProxyFromEnvironment
to incorporate these variables into the http.Client that is
used to download external data files.

The "run" subcommand exposes a new -proxy flag that can be
set to "env" (the default) to forward environment variables
or "none" to disable forwarding. The flag may be extended in
the future to support using different proxies on the DUT.

BUG= chromium:916031 
TEST=updated unit tests to verify that environment variables
     are passed; also manually verified that
     local_test_runner attempts to use proxy when vars are
     set before running "tast run"

Change-Id: Iee2f218e849eef7f410eef43e07dccb01583bbbd
Reviewed-on: https://chromium-review.googlesource.com/1382648
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>

[modify] https://crrev.com/de50149b9b19ff4c1a1eccdee82599589f5cca28/src/chromiumos/tast/devserver/util.go
[modify] https://crrev.com/de50149b9b19ff4c1a1eccdee82599589f5cca28/src/chromiumos/cmd/tast/run/config_test.go
[modify] https://crrev.com/de50149b9b19ff4c1a1eccdee82599589f5cca28/src/chromiumos/cmd/tast/run/local.go
[modify] https://crrev.com/de50149b9b19ff4c1a1eccdee82599589f5cca28/src/chromiumos/cmd/tast/run/local_test.go
[modify] https://crrev.com/de50149b9b19ff4c1a1eccdee82599589f5cca28/src/chromiumos/cmd/tast/run/sys_info.go
[modify] https://crrev.com/de50149b9b19ff4c1a1eccdee82599589f5cca28/src/chromiumos/cmd/tast/run/deps.go
[modify] https://crrev.com/de50149b9b19ff4c1a1eccdee82599589f5cca28/src/chromiumos/cmd/tast/run/config.go

Status: Fixed (was: Started)

Sign in to add a comment