1#!/bin/bash 2 3# This test makes sure that a separate repository can import the flatbuffers 4# repository and use it in their JavaScript code. 5 6# --- begin runfiles.bash initialization v3 --- 7# Copy-pasted from the Bazel Bash runfiles library v3. 8set -uo pipefail; set +e; f=bazel_tools/tools/bash/runfiles/runfiles.bash 9source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \ 10 source "$(grep -sm1 "^$f " "${RUNFILES_MANIFEST_FILE:-/dev/null}" | cut -f2- -d' ')" 2>/dev/null || \ 11 source "$0.runfiles/$f" 2>/dev/null || \ 12 source "$(grep -sm1 "^$f " "$0.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \ 13 source "$(grep -sm1 "^$f " "$0.exe.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \ 14 { echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e 15# --- end runfiles.bash initialization v3 --- 16 17BAZEL_BIN="$(rlocation bazel_linux_x86_64/file/bazel)" 18readonly BAZEL_BIN 19 20if [[ ! -x "${BAZEL_BIN}" ]]; then 21 echo "Failed to find the bazel binary." >&2 22 exit 1 23fi 24 25export PATH="$(dirname "${BAZEL_BIN}"):${PATH}" 26 27cd tests/ts/bazel_repository_test_dir/ 28 29bazel test //... 30