aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYeoh Ee Peng <ee.peng.yeoh@intel.com>2020-04-28 10:58:49 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2020-04-29 15:20:41 +0800
commitae558c35fe5fa29e8c17b41d52f1f3763bddd85e (patch)
treef9f9f89d5524bfd26cfe613e5cb5a19ec7fd226a
parente25102997df9e803577bcdb1cad8c20ac16e3361 (diff)
downloadmeta-intel-ae558c35fe5fa29e8c17b41d52f1f3763bddd85e.tar.gz
meta-intel-ae558c35fe5fa29e8c17b41d52f1f3763bddd85e.tar.bz2
meta-intel-ae558c35fe5fa29e8c17b41d52f1f3763bddd85e.zip
runtime/onednn: Check onednn file exist
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 <ee.peng.yeoh@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--lib/oeqa/runtime/miutils/tests/mkl_dnn_test.py6
1 files 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 41a76025..3f563722 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))