mirror of
https://gitee.com/openharmony/developtools_hiperf
synced 2024-11-23 07:29:42 +00:00
清理codex告警
Signed-off-by: zhangcui <zhangcui11@huawei.com>
This commit is contained in:
parent
75967204d3
commit
6e0a01e2da
@ -346,6 +346,7 @@ class LocalLibDownload:
|
||||
else:
|
||||
elf_struct.path = path
|
||||
|
||||
@classmethod
|
||||
def __get_need_architectures(self, device_arch):
|
||||
if device_arch == 'x86_64':
|
||||
return ['x86', 'x86_64']
|
||||
|
@ -169,10 +169,10 @@ class GetLibFiles(object):
|
||||
if (self.hdc.run_hdc_cmd(['shell', 'cp', device_path,
|
||||
'/data/local/tmp']) and
|
||||
self.hdc.run_hdc_cmd(['file recv',
|
||||
'/data/local/tmp/' + filename,
|
||||
os.path.join('/data/local/tmp/', filename),
|
||||
host_path])):
|
||||
self.hdc.run_hdc_cmd(['shell', 'rm',
|
||||
'/data/local/tmp/' + filename])
|
||||
os.path.join('/data/local/tmp/', filename)])
|
||||
return True
|
||||
print('failed to pull %s from device' % device_path)
|
||||
return False
|
||||
|
@ -25,9 +25,6 @@ from hiperf_utils import executable_file_available
|
||||
from hiperf_utils import find_tool_path
|
||||
|
||||
|
||||
SO = 'libhiperf_report.z.so'
|
||||
|
||||
|
||||
class TestUtils(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
@ -42,7 +39,7 @@ class TestUtils(unittest.TestCase):
|
||||
self.assertEqual(result, True)
|
||||
|
||||
def test_is_elf_file(self):
|
||||
result = is_elf_file(SO)
|
||||
result = is_elf_file('libhiperf_report.z.so')
|
||||
self.assertEqual(result, True)
|
||||
|
||||
def test_remove(self):
|
||||
|
@ -60,7 +60,7 @@ void RingBufferTest::ReadBufferAndCheck(RingBuffer &buf)
|
||||
uint8_t *p = nullptr;
|
||||
while ((p = buf.GetReadData()) != nullptr) {
|
||||
ASSERT_EQ(memcpy_s(&readData, sizeof(perf_event_header), p, sizeof(perf_event_header)), 0);
|
||||
ASSERT_EQ(checkSize, readData.size)
|
||||
ASSERT_EQ(checkSize, readData.size) \
|
||||
<< " read data size " << readData.size << " expect data size " << checkSize;
|
||||
p += sizeof(perf_event_header);
|
||||
uint8_t data = static_cast<uint8_t>(checkSize & U8MASK);
|
||||
|
Loading…
Reference in New Issue
Block a user