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

Commit 688ba5bc authored by Paul Duffin's avatar Paul Duffin Committed by Gerrit Code Review
Browse files

Merge "Remove testSdkWithJava"

parents c8ad8647 ac94726e
Loading
Loading
Loading
Loading
+0 −81
Original line number Diff line number Diff line
@@ -33,87 +33,6 @@ var prepareForSdkTestWithJavaSdkLibrary = android.GroupFixturePreparers(
	java.FixtureWithLastReleaseApis("myjavalib"),
)

func testSdkWithJava(t *testing.T, bp string) *android.TestResult {
	t.Helper()

	fs := map[string][]byte{
		"Test.java":              nil,
		"resource.test":          nil,
		"aidl/foo/bar/Test.aidl": nil,

		// For java_import
		"prebuilt.jar": nil,

		// For java_sdk_library
		"api/current.txt":                                   nil,
		"api/removed.txt":                                   nil,
		"api/system-current.txt":                            nil,
		"api/system-removed.txt":                            nil,
		"api/test-current.txt":                              nil,
		"api/test-removed.txt":                              nil,
		"api/module-lib-current.txt":                        nil,
		"api/module-lib-removed.txt":                        nil,
		"api/system-server-current.txt":                     nil,
		"api/system-server-removed.txt":                     nil,
		"build/soong/scripts/gen-java-current-api-files.sh": nil,
		"docs/known_doctags":                                nil,
		"100/public/api/myjavalib.txt":                      nil,
		"100/public/api/myjavalib-removed.txt":              nil,
		"100/system/api/myjavalib.txt":                      nil,
		"100/system/api/myjavalib-removed.txt":              nil,
		"100/module-lib/api/myjavalib.txt":                  nil,
		"100/module-lib/api/myjavalib-removed.txt":          nil,
		"100/system-server/api/myjavalib.txt":               nil,
		"100/system-server/api/myjavalib-removed.txt":       nil,
	}

	// for java_sdk_library tests
	bp = `
java_system_modules_import {
	name: "core-current-stubs-system-modules",
}
java_system_modules_import {
	name: "stable-core-platform-api-stubs-system-modules",
}
java_import {
	name: "stable.core.platform.api.stubs",
}
java_import {
	name: "android_stubs_current",
}
java_import {
	name: "android_system_stubs_current",
}
java_import {
	name: "android_test_stubs_current",
}
java_import {
	name: "android_module_lib_stubs_current",
}
java_import {
	name: "android_system_server_stubs_current",
}
java_import {
	name: "core-lambda-stubs", 
	sdk_version: "none",
}
java_import {
	name: "ext", 
	sdk_version: "none",
}
java_import {
	name: "framework", 
	sdk_version: "none",
}
prebuilt_apis {
	name: "sdk",
	api_dirs: ["100"],
}
` + bp

	return testSdkWithFs(t, bp, fs)
}

// Contains tests for SDK members provided by the java package.

func TestSdkDependsOnSourceEvenWhenPrebuiltPreferred(t *testing.T) {