mirror of
git://git.yoctoproject.org/meta-intel.git
synced 2025-07-19 12:59:03 +02:00
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>
This commit is contained in:
parent
b6175f453d
commit
89dc2a5ea2
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue
Block a user