Unverified Commit 17adc242 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update test traces to only run on retry (#30459)

parent 00c53d63
...@@ -228,7 +228,7 @@ async function main() { ...@@ -228,7 +228,7 @@ async function main() {
) )
const children = new Set() const children = new Set()
const runTest = (test = '', usePolling, isFinalRun) => const runTest = (test = '', isFinalRun) =>
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
const start = new Date().getTime() const start = new Date().getTime()
let outputChunks = [] let outputChunks = []
...@@ -250,16 +250,18 @@ async function main() { ...@@ -250,16 +250,18 @@ async function main() {
...process.env, ...process.env,
// run tests in headless mode by default // run tests in headless mode by default
HEADLESS: 'true', HEADLESS: 'true',
...(isFinalRun
? {
// only trace on final run as previous traces
// are removed anyways
TRACE_PLAYWRIGHT: 'true', TRACE_PLAYWRIGHT: 'true',
// ...(usePolling // Events can be finicky in CI. This switches to a more
// ? { // reliable polling method.
// // Events can be finicky in CI. This switches to a more
// // reliable polling method.
// CHOKIDAR_USEPOLLING: 'true', // CHOKIDAR_USEPOLLING: 'true',
// CHOKIDAR_INTERVAL: 500, // CHOKIDAR_INTERVAL: 500,
// WATCHPACK_POLLING: 500, // WATCHPACK_POLLING: 500,
// } }
// : {}), : {}),
}, },
} }
) )
...@@ -330,7 +332,7 @@ async function main() { ...@@ -330,7 +332,7 @@ async function main() {
for (let i = 0; i < numRetries + 1; i++) { for (let i = 0; i < numRetries + 1; i++) {
try { try {
console.log(`Starting ${test} retry ${i}/${numRetries}`) 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({ timings.push({
file: test, file: test,
time, time,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment