Subsume INTEGRATED_BP2BUILD into other env modes

This refactors bazel-build mode determination logic in soong_ui so it's
clearer which of three possible modes are being used in a given
invocation (NO_BAZEL, GENERATE_BUILD_FILES, or MIXED_BUILDS).

Test: bootstrap tests
Change-Id: I41d2baebf8d560c2cc42db8daa8b936101d453e3
diff --git a/tests/bootstrap_test.sh b/tests/bootstrap_test.sh
index e45df06..352197f 100755
--- a/tests/bootstrap_test.sh
+++ b/tests/bootstrap_test.sh
@@ -482,14 +482,14 @@
   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 @@
 }
 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 @@
 }
 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 @@
   fi
 }
 
-function test_integrated_bp2build_add_to_glob {
+function test_bp2build_add_to_glob {
   setup
 
   mkdir -p a
@@ -548,11 +548,11 @@
 }
 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 @@
   fi
 }
 
-function test_integrated_bp2build_bazel_workspace_structure {
+function test_bp2build_bazel_workspace_structure {
   setup
 
   mkdir -p a/b
@@ -578,7 +578,7 @@
 }
 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 @@
   [[ ! -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 @@
 }
 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_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