aboutsummaryrefslogtreecommitdiffstats
path: root/python/python_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Fix embedded_launcher can't find filesNan Zhang2018-06-041-9/+9
| | | | | | | | | | | The problem came from Python libraries doesn't know the information that we enabled embedded_launcher (only Python binary knows about that). And we can't simply remove runfiles dir for Python libraries since host Python mode need this. Bug: b/80441699 Test: m perf_profo_flames Change-Id: I73ffc4d7504f95a708ae7cca47bc6c15a673aa31
* Add Python protobuf support.Nan Zhang2018-03-221-5/+5
| | | | | | | | Python protobuf std libs will be wrapped in final binary/test par file. Bug: b/70568913 Test: manually create real examples. Change-Id: I7376ec9175f3e03d1adbd20858a7f74e826387ad
* Extract failIfErrored() to android/testing.goLogan Chien2018-03-151-11/+2
| | | | | | Bug: 74506774 Test: lunch aosp_walleye-userdebug && make # runs unit tests Change-Id: I1c09412d5988dca2cc1c5f041893b313ab1c163a
* Remove timestamp based filelist file for tracking Python dependenciesNan Zhang2018-03-091-42/+26
| | | | | | | | | | | Each Python module will generate a zip file containing source & data files. The Python binary will collect all its dependencies and use merge_zips to merge each zip file to create a final .par file. Test: m -j checkbuild && real examples: Bug: b/70568913 Change-Id: I9ff232d461d33e1c06026e7dcb5b124bf02c3ce5
* Let tests override environmentColin Cross2017-10-101-1/+1
| | | | | | | | Pass an environment to TestConfig that will be used for all Config.Getenv calls. Test: none Change-Id: I683cd9c9e0db61c9bfd2adb27fca78f558f225c4
* Add support for python_defaults modulesNan Zhang2017-09-051-5/+35
| | | | | Test: python_test.go Change-Id: I2077414a5b06da5e660a1b48bfdb2eb926fb702f
* <Hermetic> Replace Soong Python bootstrap process with embeddedNan Zhang2017-09-051-16/+12
| | | | | | | | | | | | | | | | | | | | launcher. For Python2, we bundle embedded launcher as bootstrapper within every .par file. This feature is only enabled for linux_x86_64 for now. We provide a user flag: hermetic_enabled within bp file. By default, Pyhon2 still use classic bootstrapping way to construct .par file and relys on host interpreter. Once embedded_launcher is enabled, launcher will be used to bootstrap .par file and execute user program. For Python3, the launcher will be ready soon, and for now it still relys on classic bootstrapping. Test: Real example is used to test. Bug: b/63018041 Change-Id: I28deba413d8ad3af407595e46f77d663e79a3705
* Add integration testing infrastructureColin Cross2017-07-141-23/+8
| | | | | | | | | | | | | | | | | | | | | Fix mutator registration for tests to allow different tests in the same package to register different mutators. Allow tests to track the resulting ModuleBuildParams objects to use in assertions, and provide helpers for getting them. For example: config := android.TestConfig(buildDir) ctx := android.NewTestContext() ctx.RegisterModuleType(...) ctx.MockFileSystem(...) ctx.ParseBlueprintsFile("Android.bp") ctx.PrepareBuildActions(config) ctx.Register() // Get the Inputs value passed to the javac rule for the foo module inputs := ctx.ModuleForTests("foo".Rule("javac").Inputs Test: java_test.go Change-Id: I10c82967f5f3586d2c176f169906b571ed82fc73
* Refactor factoriesColin Cross2017-06-301-2/+4
| | | | | | | | | Change module factories from returning a blueprint.Module and a list of property structs to returning an android.Module, which holds the list of property structs. Test: build.ninja identical except for Factory: comment lines Change-Id: Ica1d823f009db812c518f271a386fbff39c9766f
* Fix the issue that /tmp/soong_python_test* isn't being removed.Nan Zhang2017-06-121-3/+3
| | | | | | Bug: 62499851 Test: go test Change-Id: I84bd66cd1410dd9fc6add3ba5626d8ec4fe702d7
* Add python_test_host module.Nan Zhang2017-05-171-1/+1
| | | | | | bug: 31676493 Test: created py_test modules in real folder. and ran 'mma'. Change-Id: I22aa2fad74b11e4a31ea7a4c4a4f0ea64cd3fc94
* Supported python build in host side.Nan Zhang2017-05-051-0/+456
The base module handles all the common functionalites, such as version compatibilty check, version variations split, source file format check, source/data file duplicate check. The library/binary module focuses on how to generate binary build actions, such as setting up stub script, zipping, filling in __init__.py in runfiles dir tree. Bug: b/31676493 Test: go test under python package Change-Id: I06608369f350f7195873d459e1c8d1bdb811e77e