summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2021-03-18 00:20:11 +0000
committer Paul Duffin <paulduffin@google.com> 2021-03-18 00:21:38 +0000
commit6e3ce72b3c5b995dd178f26149386a9fcb88a2fd (patch)
tree14699a963ee6e49b6cd4353bd9459631b3acfbe4
parent45a497180892a47cd69758b9d9126b7c608485ce (diff)
Add preparers for sysprop
Bug: 181070625 Test: m nothing Change-Id: I3c9c36e7270b68ff7d354acb239b47441335a931
-rw-r--r--sysprop/Android.bp1
-rw-r--r--sysprop/sysprop_library.go6
-rw-r--r--sysprop/testing.go19
3 files changed, 25 insertions, 1 deletions
diff --git a/sysprop/Android.bp b/sysprop/Android.bp
index 540a8dae8..1d5eb3130 100644
--- a/sysprop/Android.bp
+++ b/sysprop/Android.bp
@@ -14,6 +14,7 @@ bootstrap_go_package {
],
srcs: [
"sysprop_library.go",
+ "testing.go",
],
testSrcs: [
"sysprop_test.go",
diff --git a/sysprop/sysprop_library.go b/sysprop/sysprop_library.go
index 892a16c8d..f1c2d0df0 100644
--- a/sysprop/sysprop_library.go
+++ b/sysprop/sysprop_library.go
@@ -193,7 +193,11 @@ func SyspropLibraries(config android.Config) []string {
}
func init() {
- android.RegisterModuleType("sysprop_library", syspropLibraryFactory)
+ registerSyspropBuildComponents(android.InitRegistrationContext)
+}
+
+func registerSyspropBuildComponents(ctx android.RegistrationContext) {
+ ctx.RegisterModuleType("sysprop_library", syspropLibraryFactory)
}
func (m *syspropLibrary) Name() string {
diff --git a/sysprop/testing.go b/sysprop/testing.go
new file mode 100644
index 000000000..3e14be1a8
--- /dev/null
+++ b/sysprop/testing.go
@@ -0,0 +1,19 @@
+// Copyright (C) 2021 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package sysprop
+
+import "android/soong/android"
+
+var PrepareForTestWithSyspropBuildComponents = android.FixtureRegisterWithContext(registerSyspropBuildComponents)