未验证 提交 e5d934a8 编写于 作者: O openharmony_ci 提交者: Gitee

!7024 hidebug测试用例修复

Merge pull request !7024 from chenxuihui/master
...@@ -30,7 +30,7 @@ describe('HidebugJsTest', function () { ...@@ -30,7 +30,7 @@ describe('HidebugJsTest', function () {
console.log('************* DFX_DFR_Hiprofiler_Interface_0600 Test start*************'); console.log('************* DFX_DFR_Hiprofiler_Interface_0600 Test start*************');
try { try {
let heapSize = hidebug.getNativeHeapSize(); let heapSize = hidebug.getNativeHeapSize();
expect(heapSize>=BigInt(0)).assertTrue(); expect(heapSize>BigInt(0)).assertTrue();
} catch (error) { } catch (error) {
expect().assertFail(); expect().assertFail();
} }
...@@ -46,7 +46,7 @@ describe('HidebugJsTest', function () { ...@@ -46,7 +46,7 @@ describe('HidebugJsTest', function () {
console.log('************* DFX_DFR_Hiprofiler_Interface_0400 Test start*************'); console.log('************* DFX_DFR_Hiprofiler_Interface_0400 Test start*************');
try { try {
let heapAllocatedSize = hidebug.getNativeHeapAllocatedSize(); let heapAllocatedSize = hidebug.getNativeHeapAllocatedSize();
expect(heapAllocatedSize>=BigInt(0)).assertTrue(); expect(heapAllocatedSize>BigInt(0)).assertTrue();
} catch (error) { } catch (error) {
expect().assertFail(); expect().assertFail();
} }
...@@ -62,7 +62,7 @@ describe('HidebugJsTest', function () { ...@@ -62,7 +62,7 @@ describe('HidebugJsTest', function () {
console.log('************* DFX_DFR_Hiprofiler_Interface_0500 Test start*************'); console.log('************* DFX_DFR_Hiprofiler_Interface_0500 Test start*************');
try { try {
let heapFreeSize = hidebug.getNativeHeapFreeSize(); let heapFreeSize = hidebug.getNativeHeapFreeSize();
expect(heapFreeSize>=BigInt(0)).assertTrue(); expect(heapFreeSize>BigInt(0)).assertTrue();
} catch (error) { } catch (error) {
expect().assertFail(); expect().assertFail();
} }
...@@ -426,7 +426,7 @@ describe('HidebugJsTest', function () { ...@@ -426,7 +426,7 @@ describe('HidebugJsTest', function () {
} }
hidebug.stopJsCpuProfiling(); hidebug.stopJsCpuProfiling();
var pid = process.pid; var pid = process.pid;
let path = "/proc/" + pid + "/root/data/storage/el2/base/files/" + filename + ".json"; let path = "/proc/" + pid + "/root/data/storage/el2/base/files/" + filename + ".cpuprofile";
let data = fileio.readTextSync(path); let data = fileio.readTextSync(path);
if (data.includes("napi")) { if (data.includes("napi")) {
expect(true).assertTrue(); expect(true).assertTrue();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册