1*333d2b36SAndroid Build Coastguard Workerpackage tradefed 2*333d2b36SAndroid Build Coastguard Worker 3*333d2b36SAndroid Build Coastguard Workerimport ( 4*333d2b36SAndroid Build Coastguard Worker "android/soong/android" 5*333d2b36SAndroid Build Coastguard Worker 6*333d2b36SAndroid Build Coastguard Worker "github.com/google/blueprint" 7*333d2b36SAndroid Build Coastguard Worker) 8*333d2b36SAndroid Build Coastguard Worker 9*333d2b36SAndroid Build Coastguard Worker// Data that test_module_config[_host] modules types will need from 10*333d2b36SAndroid Build Coastguard Worker// their dependencies to write out build rules and AndroidMkEntries. 11*333d2b36SAndroid Build Coastguard Workertype BaseTestProviderData struct { 12*333d2b36SAndroid Build Coastguard Worker // data files and apps installed for tests, relative to testcases dir. 13*333d2b36SAndroid Build Coastguard Worker TestcaseRelDataFiles []string 14*333d2b36SAndroid Build Coastguard Worker // apk for android_test 15*333d2b36SAndroid Build Coastguard Worker OutputFile android.Path 16*333d2b36SAndroid Build Coastguard Worker // Either handwritten or generated TF xml. 17*333d2b36SAndroid Build Coastguard Worker TestConfig android.Path 18*333d2b36SAndroid Build Coastguard Worker // Other modules we require to be installed to run tests. We expect base to build them. 19*333d2b36SAndroid Build Coastguard Worker HostRequiredModuleNames []string 20*333d2b36SAndroid Build Coastguard Worker RequiredModuleNames []string 21*333d2b36SAndroid Build Coastguard Worker // List of test suites base uses. 22*333d2b36SAndroid Build Coastguard Worker TestSuites []string 23*333d2b36SAndroid Build Coastguard Worker // True indicates the base modules is built for Host. 24*333d2b36SAndroid Build Coastguard Worker IsHost bool 25*333d2b36SAndroid Build Coastguard Worker // Base's sdk version for AndroidMkEntries, generally only used for Host modules. 26*333d2b36SAndroid Build Coastguard Worker LocalSdkVersion string 27*333d2b36SAndroid Build Coastguard Worker // Base's certificate for AndroidMkEntries, generally only used for device modules. 28*333d2b36SAndroid Build Coastguard Worker LocalCertificate string 29*333d2b36SAndroid Build Coastguard Worker // Indicates if the base module was a unit test. 30*333d2b36SAndroid Build Coastguard Worker IsUnitTest bool 31*333d2b36SAndroid Build Coastguard Worker // The .mk file is used AndroidMkEntries for base (soong_java_prebuilt, etc.) 32*333d2b36SAndroid Build Coastguard Worker MkInclude string 33*333d2b36SAndroid Build Coastguard Worker // The AppClass to use for the AndroidMkEntries for the base. 34*333d2b36SAndroid Build Coastguard Worker MkAppClass string 35*333d2b36SAndroid Build Coastguard Worker // value for LOCAL_MODULE_PATH. The directory where the module is installed. 36*333d2b36SAndroid Build Coastguard Worker InstallDir android.InstallPath 37*333d2b36SAndroid Build Coastguard Worker} 38*333d2b36SAndroid Build Coastguard Worker 39*333d2b36SAndroid Build Coastguard Workervar BaseTestProviderKey = blueprint.NewProvider[BaseTestProviderData]() 40