diff options
-rw-r--r-- | java/config/config.go | 2 | ||||
-rw-r--r-- | scripts/Android.bp | 33 | ||||
-rw-r--r-- | scripts/TEST_MAPPING | 8 | ||||
-rwxr-xr-x | scripts/manifest_fixer_test.py | 2 |
4 files changed, 43 insertions, 2 deletions
diff --git a/java/config/config.go b/java/config/config.go index 46cd361d7..adf9c9298 100644 --- a/java/config/config.go +++ b/java/config/config.go @@ -142,7 +142,7 @@ func init() { hostBinToolVariableWithPrebuilt("Aapt2Cmd", "prebuilts/sdk/tools", "aapt2") - pctx.SourcePathVariable("ManifestFixerCmd", "build/soong/scripts/manifest_fixer.py") + pctx.HostBinToolVariable("ManifestFixerCmd", "manifest_fixer") pctx.HostBinToolVariable("ManifestMergerCmd", "manifest-merger") diff --git a/scripts/Android.bp b/scripts/Android.bp new file mode 100644 index 000000000..35b577186 --- /dev/null +++ b/scripts/Android.bp @@ -0,0 +1,33 @@ +python_binary_host { + name: "manifest_fixer", + main: "manifest_fixer.py", + srcs: [ + "manifest_fixer.py", + ], + version: { + py2: { + enabled: true, + }, + py3: { + enabled: false, + }, + }, +} + +python_test_host { + name: "manifest_fixer_test", + main: "manifest_fixer_test.py", + srcs: [ + "manifest_fixer_test.py", + "manifest_fixer.py", + ], + version: { + py2: { + enabled: true, + }, + py3: { + enabled: false, + }, + }, + test_suites: ["general-tests"], +} diff --git a/scripts/TEST_MAPPING b/scripts/TEST_MAPPING new file mode 100644 index 000000000..cafecdeea --- /dev/null +++ b/scripts/TEST_MAPPING @@ -0,0 +1,8 @@ +{ + "presubmit" : [ + { + "name": "manifest_fixer_test", + "host": true + } + ] +} diff --git a/scripts/manifest_fixer_test.py b/scripts/manifest_fixer_test.py index 7ec899994..7fbbc17ba 100755 --- a/scripts/manifest_fixer_test.py +++ b/scripts/manifest_fixer_test.py @@ -425,4 +425,4 @@ class AddExtractNativeLibsTest(unittest.TestCase): if __name__ == '__main__': - unittest.main() + unittest.main(verbosity=2) |