From de655af4a7f7a3e340365fbd9f48815ff388d70b Mon Sep 17 00:00:00 2001 From: Alex Humesky Date: Fri, 12 Feb 2016 00:23:16 +0000 Subject: Adds a build_file_content attribute to new_git_repository, new_http_archive, and new_local_repository which allows the build file to be specified by a string directly in the rule rather than using a separate file. build_file and build_file_content are both optional, but one or the other must be specified. RELNOTES: build_file_content attribute added to new_git_repository, new_http_archive, and new_local_repository. -- MOS_MIGRATED_REVID=114490435 --- src/test/shell/bazel/local_repository_test.sh | 44 +++++++++++++++++++++------ 1 file changed, 34 insertions(+), 10 deletions(-) (limited to 'src/test/shell/bazel/local_repository_test.sh') diff --git a/src/test/shell/bazel/local_repository_test.sh b/src/test/shell/bazel/local_repository_test.sh index 82874f09ab..0546bc47b8 100755 --- a/src/test/shell/bazel/local_repository_test.sh +++ b/src/test/shell/bazel/local_repository_test.sh @@ -187,7 +187,15 @@ EOF expect_log "no such package '@common//carnivore'" } -function test_new_local_repository() { +function test_new_local_repository_with_build_file() { + do_new_local_repository_test "build_file" +} + +function test_new_local_repository_with_build_file_content() { + do_new_local_repository_test "build_file_content" +} + +function do_new_local_repository_test() { bazel clean # Create a non-Bazel directory. @@ -210,8 +218,9 @@ public class Mongoose { } EOF - build_file=BUILD.carnivore - cat > WORKSPACE < WORKSPACE < $build_file < WORKSPACE < zoo/BUILD < $build_file <& $TEST_log || fail "Failed to build/run zoo" expect_log "Tra-la!" -- cgit v1.2.3