diff options
author | Nan Zhang <nanzhang@google.com> | 2017-12-01 20:00:31 +0000 |
---|---|---|
committer | Nan Zhang <nanzhang@google.com> | 2017-12-01 20:00:31 +0000 |
commit | d9ec5e7dea386f00594c43685eb25cdb6c0b6cba (patch) | |
tree | 8ebc182125ea5934c824a583c07b123ffa1010f7 /python/test.go | |
parent | 0a32e5936b4c87bc705d06fa2d4f6fed1f58d602 (diff) | |
download | build_soong-d9ec5e7dea386f00594c43685eb25cdb6c0b6cba.tar.gz build_soong-d9ec5e7dea386f00594c43685eb25cdb6c0b6cba.tar.bz2 build_soong-d9ec5e7dea386f00594c43685eb25cdb6c0b6cba.zip |
Revert "Revert "Change Python in Soong to support device side build.""
This reverts commit 0a32e5936b4c87bc705d06fa2d4f6fed1f58d602.
Reason for revert: <libsqlite was missing for darwin_x86_64 before>
Change-Id: I2e13e849a503a705ffad425df292380f2f73954e
Diffstat (limited to 'python/test.go')
-rw-r--r-- | python/test.go | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/python/test.go b/python/test.go index de2b13e1..825e63cc 100644 --- a/python/test.go +++ b/python/test.go @@ -22,6 +22,7 @@ import ( func init() { android.RegisterModuleType("python_test_host", PythonTestHostFactory) + android.RegisterModuleType("python_test", PythonTestFactory) } type testDecorator struct { @@ -29,13 +30,18 @@ type testDecorator struct { } func (test *testDecorator) install(ctx android.ModuleContext, file android.Path) { - test.binaryDecorator.baseInstaller.install(ctx, file) + test.binaryDecorator.pythonInstaller.dir = "nativetest" + test.binaryDecorator.pythonInstaller.dir64 = "nativetest64" + + test.binaryDecorator.pythonInstaller.relative = ctx.ModuleName() + + test.binaryDecorator.pythonInstaller.install(ctx, file) } func NewTest(hod android.HostOrDeviceSupported) *Module { module, binary := NewBinary(hod) - binary.baseInstaller = NewPythonInstaller("nativetest") + binary.pythonInstaller = NewPythonInstaller("nativetest", "nativetest64") test := &testDecorator{binaryDecorator: binary} @@ -50,3 +56,10 @@ func PythonTestHostFactory() android.Module { return module.Init() } + +func PythonTestFactory() android.Module { + module := NewTest(android.HostAndDeviceSupported) + module.multilib = android.MultilibBoth + + return module.Init() +} |