From ae558c35fe5fa29e8c17b41d52f1f3763bddd85e Mon Sep 17 00:00:00 2001 From: Yeoh Ee Peng Date: Tue, 28 Apr 2020 10:58:49 +0800 Subject: 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 Signed-off-by: Anuj Mittal --- 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 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)) -- cgit v1.2.3-54-g00ecf