Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(cosmic-swingset): Include the last three lines of stderr when a make test fails #10438

Merged
merged 3 commits into from
Nov 10, 2024

Conversation

gibson042
Copy link
Member

Description

Extracted from #10165 to independently resolve a preëxisting TODO.

Security Considerations

n/a

Scaling Considerations

n/a

Documentation Considerations

n/a

Testing Considerations

Makes it easier to debug failures in make-dependent cosmic-swingset tests.

Upgrade Considerations

n/a

@gibson042 gibson042 requested a review from a team as a code owner November 9, 2024 20:02
Copy link
Member

@michaelfig michaelfig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just one minor style nit you're free to ignore.

Comment on lines 16 to 24
/** @type {Promise<string> | undefined} */
let stderrP = Promise.resolve('');
// https://nodejs.org/docs/latest/api/child_process.html#optionsstdio
let { stdio = 'pipe' } = opts;
if (stdio === 'ignore' || stdio[2] === 'ignore') {
stderrP = undefined;
stdio = typeof stdio === 'string' ? [stdio, stdio, stdio] : [...stdio];
stdio[2] = 'pipe';
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just my style. Feel free to ignore:

Suggested change
/** @type {Promise<string> | undefined} */
let stderrP = Promise.resolve('');
// https://nodejs.org/docs/latest/api/child_process.html#optionsstdio
let { stdio = 'pipe' } = opts;
if (stdio === 'ignore' || stdio[2] === 'ignore') {
stderrP = undefined;
stdio = typeof stdio === 'string' ? [stdio, stdio, stdio] : [...stdio];
stdio[2] = 'pipe';
}
/** @type {Promise<string> | undefined} */
let stderrP;
// https://nodejs.org/docs/latest/api/child_process.html#optionsstdio
let { stdio = 'pipe' } = opts;
if (stdio === 'ignore' || stdio[2] === 'ignore') {
stdio = typeof stdio === 'string' ? [stdio, stdio, stdio] : [...stdio];
stdio[2] = 'pipe';
} else {
stderrP = Promise.resolve('')
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that does read a bit better.

Copy link

cloudflare-workers-and-pages bot commented Nov 9, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: b6ac6b3
Status: ✅  Deploy successful!
Preview URL: https://b97e7baf.agoric-sdk.pages.dev
Branch Preview URL: https://gibson-2024-11-scenario2-pre.agoric-sdk.pages.dev

View logs

@gibson042 gibson042 added the automerge:squash Automatically squash merge label Nov 10, 2024
@mergify mergify bot merged commit fd68b6a into master Nov 10, 2024
81 checks passed
@mergify mergify bot deleted the gibson-2024-11-scenario2-preserve-stderr branch November 10, 2024 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:squash Automatically squash merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants