Merge "Subsume INTEGRATED_BP2BUILD into other env modes"

This commit is contained in:
Christopher Parsons
2021-04-20 23:33:40 +00:00
committed by Gerrit Code Review
5 changed files with 53 additions and 27 deletions

View File

@@ -482,14 +482,14 @@ function test_null_build_after_docs {
fi
}
function test_integrated_bp2build_smoke {
function test_bp2build_smoke {
setup
INTEGRATED_BP2BUILD=1 run_soong
GENERATE_BAZEL_FILES=1 run_soong
[[ -e out/soong/.bootstrap/bp2build_workspace_marker ]] || fail "bp2build marker file not created"
[[ -e out/soong/workspace ]] || fail "Bazel workspace not created"
}
function test_integrated_bp2build_add_android_bp {
function test_bp2build_add_android_bp {
setup
mkdir -p a
@@ -502,7 +502,7 @@ filegroup {
}
EOF
INTEGRATED_BP2BUILD=1 run_soong
GENERATE_BAZEL_FILES=1 run_soong
[[ -e out/soong/bp2build/a/BUILD ]] || fail "a/BUILD not created"
[[ -L out/soong/workspace/a/BUILD ]] || fail "a/BUILD not symlinked"
@@ -516,18 +516,18 @@ filegroup {
}
EOF
INTEGRATED_BP2BUILD=1 run_soong
GENERATE_BAZEL_FILES=1 run_soong
[[ -e out/soong/bp2build/b/BUILD ]] || fail "a/BUILD not created"
[[ -L out/soong/workspace/b/BUILD ]] || fail "a/BUILD not symlinked"
}
function test_integrated_bp2build_null_build {
function test_bp2build_null_build {
setup
INTEGRATED_BP2BUILD=1 run_soong
GENERATE_BAZEL_FILES=1 run_soong
local mtime1=$(stat -c "%y" out/soong/build.ninja)
INTEGRATED_BP2BUILD=1 run_soong
GENERATE_BAZEL_FILES=1 run_soong
local mtime2=$(stat -c "%y" out/soong/build.ninja)
if [[ "$mtime1" != "$mtime2" ]]; then
@@ -535,7 +535,7 @@ function test_integrated_bp2build_null_build {
fi
}
function test_integrated_bp2build_add_to_glob {
function test_bp2build_add_to_glob {
setup
mkdir -p a
@@ -548,11 +548,11 @@ filegroup {
}
EOF
INTEGRATED_BP2BUILD=1 run_soong
GENERATE_BAZEL_FILES=1 run_soong
grep -q a1.txt out/soong/bp2build/a/BUILD || fail "a1.txt not in BUILD file"
touch a/a2.txt
INTEGRATED_BP2BUILD=1 run_soong
GENERATE_BAZEL_FILES=1 run_soong
grep -q a2.txt out/soong/bp2build/a/BUILD || fail "a2.txt not in BUILD file"
}
@@ -564,7 +564,7 @@ function test_dump_json_module_graph() {
fi
}
function test_integrated_bp2build_bazel_workspace_structure {
function test_bp2build_bazel_workspace_structure {
setup
mkdir -p a/b
@@ -578,7 +578,7 @@ filegroup {
}
EOF
INTEGRATED_BP2BUILD=1 run_soong
GENERATE_BAZEL_FILES=1 run_soong
[[ -e out/soong/workspace ]] || fail "Bazel workspace not created"
[[ -d out/soong/workspace/a/b ]] || fail "module directory not a directory"
[[ -L out/soong/workspace/a/b/BUILD ]] || fail "BUILD file not symlinked"
@@ -589,7 +589,7 @@ EOF
[[ ! -e out/soong/workspace/out ]] || fail "out directory symlinked"
}
function test_integrated_bp2build_bazel_workspace_add_file {
function test_bp2build_bazel_workspace_add_file {
setup
mkdir -p a
@@ -602,10 +602,10 @@ filegroup {
}
EOF
INTEGRATED_BP2BUILD=1 run_soong
GENERATE_BAZEL_FILES=1 run_soong
touch a/a2.txt # No reference in the .bp file needed
INTEGRATED_BP2BUILD=1 run_soong
GENERATE_BAZEL_FILES=1 run_soong
[[ -L out/soong/workspace/a/a2.txt ]] || fail "a/a2.txt not symlinked"
}
@@ -622,9 +622,9 @@ test_add_file_to_soong_build
test_glob_during_bootstrapping
test_soong_build_rerun_iff_environment_changes
test_dump_json_module_graph
test_integrated_bp2build_smoke
test_integrated_bp2build_null_build
test_integrated_bp2build_add_android_bp
test_integrated_bp2build_add_to_glob
test_integrated_bp2build_bazel_workspace_structure
test_integrated_bp2build_bazel_workspace_add_file
test_bp2build_smoke
test_bp2build_null_build
test_bp2build_add_android_bp
test_bp2build_add_to_glob
test_bp2build_bazel_workspace_structure
test_bp2build_bazel_workspace_add_file