mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 18:25:13 +08:00
This works around a pre-existing inspector issue: if the debuggee exits too quickly the inspector can segfault while tearing down. For now normalize the trailing segfault as completion to keep the CI green until the upstream bug is fixed, since it only reproduces on some slow CI machines and is not what the probe tests care about. PR-URL: https://github.com/nodejs/node/pull/62851 Refs: https://github.com/nodejs/node/issues/62765 Refs: https://github.com/nodejs/node/issues/58245 Reviewed-By: Jan Martin <jan.krems@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Filip Skokan <panva.ip@gmail.com>
24 lines
625 B
JavaScript
24 lines
625 B
JavaScript
// This tests debugger probe text output for a single hit.
|
|
'use strict';
|
|
|
|
const common = require('../common');
|
|
common.skipIfInspectorDisabled();
|
|
|
|
const { spawnSyncAndAssert } = require('../common/child_process');
|
|
const { assertProbeText, probeScript } = require('../common/debugger-probe');
|
|
|
|
spawnSyncAndAssert(process.execPath, [
|
|
'inspect',
|
|
'--probe', `${probeScript}:12`,
|
|
'--expr', 'finalValue',
|
|
probeScript,
|
|
], {
|
|
stdout(output) {
|
|
assertProbeText(output,
|
|
`Hit 1 at ${probeScript}:12\n` +
|
|
' finalValue = 81\n' +
|
|
'Completed');
|
|
},
|
|
trim: true,
|
|
});
|