UT用例修复沙箱引入问题

This commit is contained in:
yuhaoqiang 2024-05-21 22:54:00 +08:00
parent 2ec5960a3b
commit 3be109f09d

View File

@ -73,8 +73,7 @@ describe("HidebugJsTest", function () {
hidebug.getSharedDirty();
}
hidebug.stopProfiling();
const pid = process.pid;
let path = "/proc/" + pid + "/root/data/storage/el2/base/files/" + filename + ".json";
let path = "/proc/self/root/data/storage/el2/base/files/" + filename + ".json";
let data = fs.readTextSync(path);
if (data.includes("napi")) {
expect(true).assertTrue();
@ -103,8 +102,7 @@ describe("HidebugJsTest", function () {
hidebug.getSharedDirty();
}
hidebug.stopJsCpuProfiling();
const pid = process.pid;
let path = "/proc/" + pid + "/root/data/storage/el2/base/files/" + filename + ".json";
let path = "/proc/self/root/data/storage/el2/base/files/" + filename + ".json";
let data = fs.readTextSync(path);
if (data.includes("napi")) {
expect(true).assertTrue();