Skip to content

Commit

Permalink
Allow using a shared repository cache and install base for our integr…
Browse files Browse the repository at this point in the history
…ation tests.

This change doesn't do anything (besides printing a message) unless you run Bazel's tests with the new environment variables.

The environment variables will be set to appropriate platform-specific values by the CI scripts.

PiperOrigin-RevId: 231389821
  • Loading branch information
philwo authored and weixiao-huang committed Jan 31, 2019
1 parent de71041 commit 205bb68
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/test/shell/testenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,21 @@ common --color=no --curses=no
${EXTRA_BAZELRC:-}
EOF

if [[ -d ${REPOSITORY_CACHE:-} ]]; then
echo "testenv.sh: Using repository cache at $REPOSITORY_CACHE."
cat >>$TEST_TMPDIR <<EOF
sync --repository_cache=$REPOSITORY_CACHE --experimental_repository_cache_hardlinks
fetch --repository_cache=$REPOSITORY_CACHE --experimental_repository_cache_hardlinks
build --repository_cache=$REPOSITORY_CACHE --experimental_repository_cache_hardlinks
query --repository_cache=$REPOSITORY_CACHE --experimental_repository_cache_hardlinks
EOF
fi

if [[ -d ${INSTALL_BASE:-} ]]; then
echo "testenv.sh: Using shared install base at $INSTALL_BASE."
echo "startup --install_base=$INSTALL_BASE" >> $TEST_TMPDIR/bazelrc
fi
}

function setup_android_sdk_support() {
Expand Down

0 comments on commit 205bb68

Please sign in to comment.