[autotest] setup_dev_autotest adds [CROS]/source_tree value to shadow_config
The [CROS]/source_tree attribute of global_config.ini is used (among
other places?) by tko/site_parse.py to find the generate_test_report
module, which resides in the chromeose checkout but outside of the
autotest repository. In prod, this points to /usr/local/google/chromeos,
but most developers do not have a chromeos checkout there.
This CL causes setup_dev_autotest to override [CROS]/source_tree in the
shadow_config that it creates, pointing it to AUTOTEST_DIR/../../../..
which is the standard location where most developers will have their
checkout. This may not be a rock solid assumption, but it is at least
better than /usr/local/google/chromeos, and at least as solid as a lot
of the other assumptions in the setup_dev_autotest script.
BUG=None
TEST=After ./setup_dev_autotest, can use tko/site_parse.py without
seeing ImportError related to generate_test_report. Also, tested new
AUTOTEST_DIR sanity check in script, by entering a non-existant
directory and seeing script abort.
Change-Id: I8f51e58f286e9c5c68bbafd3058e088beb5483f5
Reviewed-on: https://gerrit.chromium.org/gerrit/56612
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
1 file changed