aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYeoh Ee Peng <ee.peng.yeoh@intel.com>2020-04-09 15:40:11 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2020-04-09 19:17:01 +0800
commite0a8e6e48ff741c3a1eff39876c4185fc5d22601 (patch)
tree0cd92733253148cd2d1fa04be37adb709c07498a
parent3813e50e14a8bed891bd26a2a69fdef558408932 (diff)
downloadmeta-intel-e0a8e6e48ff741c3a1eff39876c4185fc5d22601.tar.gz
meta-intel-e0a8e6e48ff741c3a1eff39876c4185fc5d22601.tar.bz2
meta-intel-e0a8e6e48ff741c3a1eff39876c4185fc5d22601.zip
runtime/dldt_inference_engine: Check MYRIAD device before test
Checking MYRIAD device availability before execute MYRIAD test. 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/cases/dldt_inference_engine.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/oeqa/runtime/cases/dldt_inference_engine.py b/lib/oeqa/runtime/cases/dldt_inference_engine.py
index 2e969975..05aff61f 100644
--- a/lib/oeqa/runtime/cases/dldt_inference_engine.py
+++ b/lib/oeqa/runtime/cases/dldt_inference_engine.py
@@ -67,7 +67,11 @@ class DldtInferenceEngine(OERuntimeTestCase):
@OEHasPackage(['dldt-inference-engine-samples'])
@OEHasPackage(['dldt-inference-engine-vpu-firmware'])
def test_dldt_ie_classification_with_myriad(self):
- (status, output) = self.dldt_ie.test_dldt_ie_classification_with_device('MYRIAD', self.ir_files_dir)
+ device = 'MYRIAD'
+ (status, output) = self.dldt_ie.test_check_if_openvino_device_available(device)
+ if not status:
+ self.skipTest('OpenVINO %s device not available on target machine(availalbe devices: %s)' % (device, output))
+ (status, output) = self.dldt_ie.test_dldt_ie_classification_with_device(device, self.ir_files_dir)
self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
@OETestDepends(['dldt_inference_engine.DldtInferenceEngine.test_dldt_ie_can_create_ir_and_download_input'])
@@ -97,5 +101,9 @@ class DldtInferenceEngine(OERuntimeTestCase):
@OEHasPackage(['python3-opencv'])
@OEHasPackage(['python3-numpy'])
def test_dldt_ie_classification_python_api_with_myriad(self):
- (status, output) = self.dldt_ie.test_dldt_ie_classification_python_api_with_device('MYRIAD', self.ir_files_dir)
+ device = 'MYRIAD'
+ (status, output) = self.dldt_ie.test_check_if_openvino_device_available(device)
+ if not status:
+ self.skipTest('OpenVINO %s device not available on target machine(availalbe devices: %s)' % (device, output))
+ (status, output) = self.dldt_ie.test_dldt_ie_classification_python_api_with_device(device, self.ir_files_dir)
self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))