Previously, the status return with 0 even though the file
required was not exist.
Fixed the file exist checking for onednn source file required
for compilation testing.

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

diff --git a/lib/oeqa/runtime/miutils/tests/mkl_dnn_test.py 
b/lib/oeqa/runtime/miutils/tests/mkl_dnn_test.py
index 41a7602..3f56372 100644
--- a/lib/oeqa/runtime/miutils/tests/mkl_dnn_test.py
+++ b/lib/oeqa/runtime/miutils/tests/mkl_dnn_test.py
@@ -13,9 +13,9 @@ class MkldnnTest(object):
         mkldnn_src_test_filename = 'api.c'
         mkldnn_src_test_file = ''
         
-        (status, output) = self.target.run('cd %s; find -name %s' % 
(mkldnn_src_dir, mkldnn_src_test_filename))
-        if status:
-            return status, output
+        (__, output) = self.target.run('cd %s; find -name %s' % 
(mkldnn_src_dir, mkldnn_src_test_filename))
+        if 'No such file or directory' in output:
+            return -1, output
 
         mkldnn_src_test_file = os.path.join(mkldnn_src_dir, output)
         (status, output) = self.target.run('gcc %s -o /tmp/%s -ldnnl' % 
(mkldnn_src_test_file, self.mkldnn_target_test_filename))
-- 
2.7.4

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

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

Reply via email to