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

Update test traces to only run on retry #30459

Merged
merged 3 commits into from
Oct 27, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions run-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ async function main() {
)
const children = new Set()

const runTest = (test = '', usePolling, isFinalRun) =>
const runTest = (test = '', isFinalRun) =>
new Promise((resolve, reject) => {
const start = new Date().getTime()
let outputChunks = []
Expand All @@ -250,16 +250,18 @@ async function main() {
...process.env,
// run tests in headless mode by default
HEADLESS: 'true',
TRACE_PLAYWRIGHT: 'true',
// ...(usePolling
// ? {
// // Events can be finicky in CI. This switches to a more
// // reliable polling method.
// CHOKIDAR_USEPOLLING: 'true',
// CHOKIDAR_INTERVAL: 500,
// WATCHPACK_POLLING: 500,
// }
// : {}),
...(isFinalRun
? {
// only trace on final run as previous traces
// are removed anyways
TRACE_PLAYWRIGHT: 'true',
// Events can be finicky in CI. This switches to a more
// reliable polling method.
// CHOKIDAR_USEPOLLING: 'true',
// CHOKIDAR_INTERVAL: 500,
// WATCHPACK_POLLING: 500,
}
: {}),
},
}
)
Expand Down Expand Up @@ -330,7 +332,7 @@ async function main() {
for (let i = 0; i < numRetries + 1; i++) {
try {
console.log(`Starting ${test} retry ${i}/${numRetries}`)
const time = await runTest(test, i > 0, i === numRetries)
const time = await runTest(test, i === numRetries)
timings.push({
file: test,
time,
Expand Down