Enable checking of available inference engine devices.

Signed-off-by: Yeoh Ee Peng <[email protected]>
---
 lib/oeqa/runtime/miutils/tests/dldt_inference_engine_test.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/oeqa/runtime/miutils/tests/dldt_inference_engine_test.py 
b/lib/oeqa/runtime/miutils/tests/dldt_inference_engine_test.py
index a44f902..31bfb53 100644
--- a/lib/oeqa/runtime/miutils/tests/dldt_inference_engine_test.py
+++ b/lib/oeqa/runtime/miutils/tests/dldt_inference_engine_test.py
@@ -16,10 +16,18 @@ class DldtInferenceEngineTest(object):
         self.target.run('mkdir -p %s' % self.work_dir)
         self.target.copy_to(os.path.join(files_path, 'dldt-inference-engine', 
self.ie_input_files['ie_python_sample']),
                             self.work_dir)
+        python_cmd = 'from openvino.inference_engine import IENetwork, IECore; 
ie = IECore(); print(ie.available_devices)'
+        __, output = self.target.run('python3 -c "%s"' % python_cmd)
+        self.available_devices = output
 
     def tear_down(self):
         self.target.run('rm -rf %s' % self.work_dir)
 
+    def test_check_if_openvino_device_available(self, device):
+        if device not in self.available_devices:
+            return False, self.available_devices
+        return True, self.available_devices
+
     def test_can_download_input_file(self, proxy_port):
         return self.target.run('cd %s; wget %s -e https_proxy=%s' %
                                (self.work_dir,
-- 
2.7.4

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#6469): 
https://lists.yoctoproject.org/g/meta-intel/message/6469
Mute This Topic: https://lists.yoctoproject.org/mt/72891783/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-intel/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to