Esempio n. 1
0
 def setup(self):
     self.setUpSuccessful = False
     super().setup()
     log.info(self.audioFile)
     compLibObj = LinuxWearablesLibrary(self.campDevice)
     log.info('Checking/Installing the Automation APK')
     self.libObj.checkAndInstallAPK(APK.AUTOMATION_APK.value)
     compLibObj.checkAndInstallAPK(APK.AUTOMATION_APK.value, 'comp')
     self.installAudioAPK(self.libObj, APK.LW_AUDIO.value, self.device)
     self.installAudioAPK(compLibObj, APK.COMPANION_AUDIO.value,
                          self.campDevice)
     self.compIotLibObj = IOTLibrary(self.campDevice)
     log.info(
         'Creating Screenshot folder in Companion and Wearable To Collect Logs'
     )
     self.campDevice.makeDirectoryOnDevice(FILE.SCREENSHOT.value)
     log.info('Pushing audio Files to companion')
     audioFilePath = self.libObj.buildPath(IOT_CLIPS_AUDIO, self.audioFile)
     self.campDevice.makeDirectoryOnDevice(
         SYSTEM_FILE.COMP_MUSIC_FOLDER.value)
     self.campDevice.pushResource(audioFilePath,
                                  SYSTEM_FILE.COMP_MUSIC_FOLDER.value)
     log.info('Syncying The Audio File from Companion to Wearable Device')
     options = "-w -r -e debug false -e class " + self.libObj.getInstrumentationCommand(
         'AudioCompSync')
     output = self.campDevice.executeAmCommand(
         AM_SUB_COMMANDS.INSTRUMENT.value, options)
     self.libObj.toggleBluetooth(True)
     log.info('Sleeping 10 seconds')
     time.sleep(SLEEP.SLEEP_10.value)
     if 'Fail' in output:
         log.info(output)
         self.comments += 'Sync from companion to wearable did not occur'
         raise Exception('Sync from companion to wearable did not occur')
     self.setUpSuccessful = True
 def setup(self):
     self.setUpSuccessful = False
     super().setup()
     log.info('Checking/Installing the Automation APK on companion')
     compLibObj = LinuxWearablesLibrary(self.campDevice)
     compLibObj.checkAndInstallAPK(APK.AUTOMATION_APK.value, 'comp')
     log.info('Turning On Bluetooth in Wearable')
     self.compIotLibObj = IOTLibrary(self.campDevice)
     log.info('Creating Screenshot folder in Companion and Wearable To Collect Logs')
     self.campDevice.makeDirectoryOnDevice(FILE.SCREENSHOT.value)
     self.device.makeDirectoryOnDevice(FILE.SCREENSHOT.value)
     self.libObj.toggleBluetooth(True)
     self.setUpSuccessful = True
Esempio n. 3
0
 def setup(self):
     super().setup()
     log.info('Checking/Installing the Automation APK on both LW and Companion')
     self.libObj.checkAndInstallAPK(APK.AUTOMATION_APK.value, 'LW')
     compLibObj = LinuxWearablesLibrary(self.campDevice)
     compLibObj.checkAndInstallAPK(APK.AUTOMATION_APK.value, 'comp')
     self.compIotLibObj = IOTLibrary(self.campDevice)
     log.info('Creating Screenshot folder in Companion and Wearable To Collect Logs')
     self.campDevice.makeDirectoryOnDevice(FILE.SCREENSHOT.value)
     log.info('Turning On Bluetooth')
     self.libObj.toggleBluetooth(True)
     log.info('Sleeping 10 seconds')
     time.sleep(SLEEP.SLEEP_10.value)
Esempio n. 4
0
 def setup(self):
     self.skipBTCheck = True
     super().setup()
     log.info(
         'Checking/Installing the Automation APK on both LW and Companion')
     self.libObj.checkAndInstallAPK(APK.AUTOMATION_APK.value, 'LW', True)
     compLibObj = LinuxWearablesLibrary(self.campDevice)
     compLibObj.checkAndInstallAPK(APK.AUTOMATION_APK.value, 'comp')
     self.compIotLibObj = IOTLibrary(self.campDevice)
     log.info(
         'Creating Screenshot folder in Companion and Wearable To Collect Logs'
     )
     self.campDevice.makeDirectoryOnDevice(FILE.SCREENSHOT.value)
     self.device.makeDirectoryOnDevice(FILE.SCREENSHOT.value)