diff options
author | Philipp Schrader <philipp.schrader@gmail.com> | 2023-05-10 21:35:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-10 21:35:58 -0700 |
commit | c2bf8106389e3b1595a24fbac324ad02952c009b (patch) | |
tree | d320c6ccca658df180ea4457b805d027a24deb2b | |
parent | 0ce6957763e5e5f3cd0b421a473d252d2ba7ef35 (diff) | |
download | flatbuffers-c2bf8106389e3b1595a24fbac324ad02952c009b.tar.gz flatbuffers-c2bf8106389e3b1595a24fbac324ad02952c009b.tar.bz2 flatbuffers-c2bf8106389e3b1595a24fbac324ad02952c009b.zip |
Fix //tests/ts:bazel_repository_test (#7952)
The test was not actually invoking the bazel that was downloaded with
the `http_file` rule. I failed to add `executable = True` to the
`http_file` call. This caused the test to ignore that bazel binary and
went to the next one on the system.
This patch fixes the issue by adding the missing attribute. Also, this
patch changes the check in the test to make sure that the downloaded
file is indeed executable.
-rw-r--r-- | WORKSPACE | 1 | ||||
-rwxr-xr-x | tests/ts/bazel_repository_test.sh | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -148,6 +148,7 @@ esbuild_register_toolchains( http_file( name = "bazel_linux_x86_64", downloaded_file_path = "bazel", + executable = True, sha256 = "e89747d63443e225b140d7d37ded952dacea73aaed896bca01ccd745827c6289", urls = [ "https://github.com/bazelbuild/bazel/releases/download/6.1.2/bazel-6.1.2-linux-x86_64", diff --git a/tests/ts/bazel_repository_test.sh b/tests/ts/bazel_repository_test.sh index 50308093..94e115c7 100755 --- a/tests/ts/bazel_repository_test.sh +++ b/tests/ts/bazel_repository_test.sh @@ -17,7 +17,7 @@ source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \ BAZEL_BIN="$(rlocation bazel_linux_x86_64/file/bazel)" readonly BAZEL_BIN -if [[ ! -e "${BAZEL_BIN}" ]]; then +if [[ ! -x "${BAZEL_BIN}" ]]; then echo "Failed to find the bazel binary." >&2 exit 1 fi |