From 436ef73258f6eee2daa1ff129fd4fba8cbe0ed99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 18 May 2021 19:04:20 +0200 Subject: [PATCH] test: adapt test-linux-perf to V8 changes Refs: https://github.com/v8/v8/commit/9a31804bbe6597bfb54b47958fd3839f2da51875 PR-URL: https://github.com/nodejs/node/pull/38273 Backport-PR-URL: https://github.com/nodejs/node/pull/38991 Reviewed-By: Jiawen Geng Reviewed-By: Colin Ihrig Reviewed-By: Antoine du Hamel Reviewed-By: Michael Dawson Reviewed-By: Mary Marchini --- test/v8-updates/test-linux-perf.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/test/v8-updates/test-linux-perf.js b/test/v8-updates/test-linux-perf.js index 9a8097b071a2b5..58388d37ce52ea 100644 --- a/test/v8-updates/test-linux-perf.js +++ b/test/v8-updates/test-linux-perf.js @@ -96,17 +96,20 @@ for (const perfArgs of perfArgsList) { output += perfScript.stdout; } -const interpretedFunctionOneRe = /InterpretedFunction:functionOne/; -const compiledFunctionOneRe = /LazyCompile:\*functionOne/; -const interpretedFunctionTwoRe = /InterpretedFunction:functionTwo/; -const compiledFunctionTwoRe = /LazyCompile:\*functionTwo/; +const interpretedFunctionOneRe = /~functionOne/; +const compiledFunctionOneRe = /\*functionOne/; +const interpretedFunctionTwoRe = /~functionTwo/; +const compiledFunctionTwoRe = /\*functionTwo/; +function makeAssertMessage(message) { + return message + '\nPerf output:\n\n' + output; +} assert.ok(output.match(interpretedFunctionOneRe), - "Couldn't find interpreted functionOne()"); + makeAssertMessage("Couldn't find interpreted functionOne()")); assert.ok(output.match(compiledFunctionOneRe), - "Couldn't find compiled functionOne()"); + makeAssertMessage("Couldn't find compiled functionOne()")); assert.ok(output.match(interpretedFunctionTwoRe), - "Couldn't find interpreted functionTwo()"); + makeAssertMessage("Couldn't find interpreted functionTwo()")); assert.ok(output.match(compiledFunctionTwoRe), - "Couldn't find compiled functionTwo"); + makeAssertMessage("Couldn't find compiled functionTwo"));