Skip to content

Commit

Permalink
Make sure we always use an absolute path for ${RUNFILES}
Browse files Browse the repository at this point in the history
Related to: bazelbuild#148
  • Loading branch information
mattmoor committed Sep 18, 2017
1 parent 7fc2bd0 commit 1cc2028
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docker/incremental_load.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -eu

# This is a generated file that loads all docker layers built by "docker_build".

RUNFILES="${PYTHON_RUNFILES:-${BASH_SOURCE[0]}.runfiles}"
RUNFILES="${PYTHON_RUNFILES:-${PWD}/${BASH_SOURCE[0]}.runfiles}"

DOCKER="${DOCKER:-docker}"

Expand Down
12 changes: 12 additions & 0 deletions testing/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,17 @@ function clear_docker() {
docker rmi -f $(docker images -aq) || true
}

function test_bazel_build_then_run_docker_build_clean() {
cd "${ROOT}"
for target in $(bazel query 'kind("docker_build", "docker/testdata/...")');
do
clear_docker
bazel build $target
# Replace : with /
./bazel-bin/${target/://}
done
}

function test_bazel_run_docker_build_clean() {
cd "${ROOT}"
for target in $(bazel query 'kind("docker_build", "docker/testdata/...")');
Expand Down Expand Up @@ -200,6 +211,7 @@ function test_war_image() {
}

test_top_level
test_bazel_build_then_run_docker_build_clean
test_bazel_run_docker_build_clean
test_bazel_run_docker_bundle_clean
test_bazel_run_docker_import_clean
Expand Down

0 comments on commit 1cc2028

Please sign in to comment.