The CHROME_HEADLESS environment variable is set when building and running tests on bots.
The python function pylib.constants.CheckOutputDirectory() checks this variable when CHROMIUM_OUTPUT_DIR or BUILDTYPE are not defined, in order to auto-detect the current Chromium output directory.
The logic is essentially:
- Glob all files that match $CHROME_SRC_DIR/out/*/build.ninja
- If there is only one such file, the use its directory as the new
value for CHROMIUM_OUTPUT_DIR, otherwise, print an error.
According to jbudorick@, we should get rid of this magic, and ensure the bots always set CHROMIUM_OUTPUT_DIR properly before invoking the Python scripts used during the Android build instead.
This entry is to track the issue.
Comment 1 by dtrainor@chromium.org
, Apr 18 2018