Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 255648c6 authored by Spandan Das's avatar Spandan Das
Browse files

Create a smoke test for api_bp2build workspace

This test builds an "empty" filegroup. Running it can be useful to
verify that the api_bp2build workspace has been setup correctly.

Test: TH
Change-Id: I78639a2dcdeb659b2d6fdf6abc85d85c4fb697bf
parent 83e787e8
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -145,8 +145,10 @@ func runQueryView(queryviewDir, queryviewMarker string, ctx *android.Context) {
func runApiBp2build(ctx *android.Context, extraNinjaDeps []string) string {
	ctx.EventHandler.Begin("api_bp2build")
	defer ctx.EventHandler.End("api_bp2build")
	// Do not allow missing dependencies.
	ctx.SetAllowMissingDependencies(false)
	// api_bp2build does not run the typical pipeline of soong mutators.
	// Hoevever, it still runs the defaults mutator which can create dependencies.
	// These dependencies might not always exist (e.g. in tests)
	ctx.SetAllowMissingDependencies(ctx.Config().AllowMissingDependencies())
	ctx.RegisterForApiBazelConversion()

	// Register the Android.bp files in the tree
+7 −0
Original line number Diff line number Diff line
@@ -231,4 +231,11 @@ EOF
  fi
}

# Smoke test to verify api_bp2build worksapce does not contain any errors
function test_api_bp2build_empty_build() {
  setup
  run_soong api_bp2build
  run_bazel build --config=android --config=api_bp2build //:empty
}

scan_and_run_tests