summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYeoh Ee Peng <ee.peng.yeoh@intel.com>2020-04-09 07:40:10 (GMT)
committerAnuj Mittal <anuj.mittal@intel.com>2020-04-09 11:17:01 (GMT)
commit3813e50e14a8bed891bd26a2a69fdef558408932 (patch)
treed0de54efd4b6d12644c2be4c73367bbbe322ad2f
parentbd539ea962ee285eb71053583e3c17fa166fc610 (diff)
downloadmeta-intel-3813e50e14a8bed891bd26a2a69fdef558408932.tar.gz
runtime/tests/dldt_inference_engine_test: Enable check available ie devices
Enable checking of available inference engine devices. Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--lib/oeqa/runtime/miutils/tests/dldt_inference_engine_test.py8
1 files changed, 8 insertions, 0 deletions
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):
16 self.target.run('mkdir -p %s' % self.work_dir) 16 self.target.run('mkdir -p %s' % self.work_dir)
17 self.target.copy_to(os.path.join(files_path, 'dldt-inference-engine', self.ie_input_files['ie_python_sample']), 17 self.target.copy_to(os.path.join(files_path, 'dldt-inference-engine', self.ie_input_files['ie_python_sample']),
18 self.work_dir) 18 self.work_dir)
19 python_cmd = 'from openvino.inference_engine import IENetwork, IECore; ie = IECore(); print(ie.available_devices)'
20 __, output = self.target.run('python3 -c "%s"' % python_cmd)
21 self.available_devices = output
19 22
20 def tear_down(self): 23 def tear_down(self):
21 self.target.run('rm -rf %s' % self.work_dir) 24 self.target.run('rm -rf %s' % self.work_dir)
22 25
26 def test_check_if_openvino_device_available(self, device):
27 if device not in self.available_devices:
28 return False, self.available_devices
29 return True, self.available_devices
30
23 def test_can_download_input_file(self, proxy_port): 31 def test_can_download_input_file(self, proxy_port):
24 return self.target.run('cd %s; wget %s -e https_proxy=%s' % 32 return self.target.run('cd %s; wget %s -e https_proxy=%s' %
25 (self.work_dir, 33 (self.work_dir,