Skip to content

Commit 436ef73

Browse files
targosdanielleadams
authored andcommitted
test: adapt test-linux-perf to V8 changes
Refs: v8/v8@9a31804 PR-URL: #38273 Backport-PR-URL: #38991 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Mary Marchini <[email protected]>
1 parent 3b7e16f commit 436ef73

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

test/v8-updates/test-linux-perf.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,20 @@ for (const perfArgs of perfArgsList) {
9696
output += perfScript.stdout;
9797
}
9898

99-
const interpretedFunctionOneRe = /InterpretedFunction:functionOne/;
100-
const compiledFunctionOneRe = /LazyCompile:\*functionOne/;
101-
const interpretedFunctionTwoRe = /InterpretedFunction:functionTwo/;
102-
const compiledFunctionTwoRe = /LazyCompile:\*functionTwo/;
99+
const interpretedFunctionOneRe = /~functionOne/;
100+
const compiledFunctionOneRe = /\*functionOne/;
101+
const interpretedFunctionTwoRe = /~functionTwo/;
102+
const compiledFunctionTwoRe = /\*functionTwo/;
103103

104+
function makeAssertMessage(message) {
105+
return message + '\nPerf output:\n\n' + output;
106+
}
104107

105108
assert.ok(output.match(interpretedFunctionOneRe),
106-
"Couldn't find interpreted functionOne()");
109+
makeAssertMessage("Couldn't find interpreted functionOne()"));
107110
assert.ok(output.match(compiledFunctionOneRe),
108-
"Couldn't find compiled functionOne()");
111+
makeAssertMessage("Couldn't find compiled functionOne()"));
109112
assert.ok(output.match(interpretedFunctionTwoRe),
110-
"Couldn't find interpreted functionTwo()");
113+
makeAssertMessage("Couldn't find interpreted functionTwo()"));
111114
assert.ok(output.match(compiledFunctionTwoRe),
112-
"Couldn't find compiled functionTwo");
115+
makeAssertMessage("Couldn't find compiled functionTwo"));

0 commit comments

Comments
 (0)