aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/bootstrap/bootstrap.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/bootstrap/bootstrap.sh')
-rwxr-xr-xscripts/bootstrap/bootstrap.sh51
1 files changed, 0 insertions, 51 deletions
diff --git a/scripts/bootstrap/bootstrap.sh b/scripts/bootstrap/bootstrap.sh
index c50afc249a..eeac8d1d20 100755
--- a/scripts/bootstrap/bootstrap.sh
+++ b/scripts/bootstrap/bootstrap.sh
@@ -79,54 +79,3 @@ function bazel_build() {
function get_bazel_bin_path() {
_run_bootstrapping_bazel info "bazel-bin" || echo "bazel-bin"
}
-
-function md5_outputs() {
- [ -n "${BAZEL_TEST_XTRACE:-}" ] && set +x # Avoid garbage in the output
- # runfiles/MANIFEST & runfiles_manifest contain absolute path, ignore.
- # ar on OS-X is non-deterministic, ignore .a files.
- for i in $(find bazel-bin/ -type f -a \! -name MANIFEST -a \! -name '*.runfiles_manifest' -a \! -name '*.a'); do
- md5_file $i
- done
- for i in $(find bazel-genfiles/ -type f); do
- md5_file $i
- done
- [ -n "${BAZEL_TEST_XTRACE:-}" ] && set -x
-}
-
-function get_outputs_sum() {
- md5_outputs | sort -k 2
-}
-
-function bootstrap_test() {
- local BAZEL_BIN=$1
- local BAZEL_SUM=$2
- local BAZEL_TARGET=${3:-src:bazel}
- local STRATEGY="--strategy=Javac=worker --worker_quit_after_build"
- if [ "${JAVA_VERSION}" = "1.7" ]; then
- STRATEGY=
- fi
- [ -x "${BAZEL_BIN}" ] || fail "syntax: bootstrap bazel-binary"
- run ${BAZEL_BIN} --nomaster_bazelrc --bazelrc=${BAZELRC} \
- ${BAZEL_DIR_STARTUP_OPTIONS} \
- clean \
- --expunge || return $?
- run ${BAZEL_BIN} --nomaster_bazelrc --bazelrc=${BAZELRC} \
- ${BAZEL_DIR_STARTUP_OPTIONS} \
- build \
- ${EXTRA_BAZEL_ARGS-} ${STRATEGY} \
- --fetch --nostamp \
- --define "JAVA_VERSION=${JAVA_VERSION}" \
- --javacopt="-g -source ${JAVA_VERSION} -target ${JAVA_VERSION}" \
- ${BAZEL_TARGET} || return $?
- if [ -n "${BAZEL_SUM}" ]; then
- cat bazel-genfiles/src/java.version >${BAZEL_SUM}
- get_outputs_sum >> ${BAZEL_SUM} || return $?
- fi
- if [ -z "${BOOTSTRAP:-}" ]; then
- tempdir
- BOOTSTRAP=${NEW_TMPDIR}/bazel
- local FILE=bazel-bin/${BAZEL_TARGET##//}
- cp -f ${FILE/:/\/} $BOOTSTRAP
- chmod +x $BOOTSTRAP
- fi
-}