Skip to content

Commit 2c946bc

Browse files
author
Yuki Okushi
authored
Rollup merge of rust-lang#106689 - GuillaumeGomez:rustdoc-gui-files-array, r=notriddle
Fix invalid files array re-creation in rustdoc-gui tester It fixes the error <code>expected `runTest` first argument to be a string</code>: ``` { file_name: { file_name: '/home/imperio/rust/rust/src/test/rustdoc-gui/type-declation-overflow.goml', output: 'type-declation-overflow... FAILED\n' + '...' }, output: Error: expected `runTest` first argument to be a string at runTest (/home/imperio/rust/rust/node_modules/browser-ui-test/src/index.js:591:15) at runTests (/home/imperio/rust/rust/src/tools/rustdoc-gui/tester.js:144:26) at main (/home/imperio/rust/rust/src/tools/rustdoc-gui/tester.js:278:15) } Error: expected `runTest` first argument to be a string at runTest (/home/imperio/rust/rust/node_modules/browser-ui-test/src/index.js:591:15) at runTests (/home/imperio/rust/rust/src/tools/rustdoc-gui/tester.js:144:26) at main (/home/imperio/rust/rust/src/tools/rustdoc-gui/tester.js:278:15) ``` The problem was that I concatenated two arrays of object whereas `files` is supposed to be an array of string. r? `@notriddle`
2 parents c2d1cac + 2214c6d commit 2c946bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/rustdoc-gui/tester.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,8 @@ async function main(argv) {
278278
await runTests(opts, framework_options, files, new_results, status_bar, it + 1 >= NB_RETRY);
279279
Array.prototype.push.apply(results.successful, new_results.successful);
280280
// We generate the new list of files with the previously failing tests.
281-
files = Array.prototype.concat(new_results.failed, new_results.errored);
281+
files = Array.prototype.concat(new_results.failed, new_results.errored).map(
282+
f => f['file_name']);
282283
if (files.length > originalFilesLen / 2) {
283284
// If we have too many failing tests, it's very likely not flaky failures anymore so
284285
// no need to retry.

0 commit comments

Comments
 (0)