summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYeoh Ee Peng <ee.peng.yeoh@intel.com>2020-04-28 02:58:49 (GMT)
committerAnuj Mittal <anuj.mittal@intel.com>2020-04-28 03:09:36 (GMT)
commit89dc2a5ea2e3cafe1764242e40ec8b2afa0f54d0 (patch)
treec33f38ee812fd6819ce73741ef2ba8246db53620
parentb6175f453d976de0469195157efb3a8c2bcfc627 (diff)
downloadmeta-intel-89dc2a5ea2e3cafe1764242e40ec8b2afa0f54d0.tar.gz
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 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):
13 mkldnn_src_test_filename = 'api.c' 13 mkldnn_src_test_filename = 'api.c'
14 mkldnn_src_test_file = '' 14 mkldnn_src_test_file = ''
15 15
16 (status, output) = self.target.run('cd %s; find -name %s' % (mkldnn_src_dir, mkldnn_src_test_filename)) 16 (__, output) = self.target.run('cd %s; find -name %s' % (mkldnn_src_dir, mkldnn_src_test_filename))
17 if status: 17 if 'No such file or directory' in output:
18 return status, output 18 return -1, output
19 19
20 mkldnn_src_test_file = os.path.join(mkldnn_src_dir, output) 20 mkldnn_src_test_file = os.path.join(mkldnn_src_dir, output)
21 (status, output) = self.target.run('gcc %s -o /tmp/%s -ldnnl' % (mkldnn_src_test_file, self.mkldnn_target_test_filename)) 21 (status, output) = self.target.run('gcc %s -o /tmp/%s -ldnnl' % (mkldnn_src_test_file, self.mkldnn_target_test_filename))