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

Easier debugging and troubleshooting of Test262 tests #1812

Merged
merged 1 commit into from
Sep 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions polyfill/ci_test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

TESTS=${@:-"./*/**/*.js"}
TIMEOUT=${TIMEOUT:-10000}
PRELUDE=${PRELUDE:-script.js}

export NODE_PATH=$PWD/node_modules
Expand Down Expand Up @@ -37,6 +38,7 @@ test262-harness \
--reporter-keys file,rawResult,result,scenario \
--test262Dir ../test262 \
--prelude "../$PRELUDE" \
--timeout "$TIMEOUT" \
--preprocessor ./preprocessor.test262.js \
$TRANSFORMER_ARG \
"$TESTS" \
Expand Down
5 changes: 5 additions & 0 deletions polyfill/test/parseResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ stdin.on('end', function () {
const unexpectedPasses = [];
for (const test of tests) {
const { result, scenario, file } = test;
if (result.message === 'Debugger attached.\nWaiting for the debugger to disconnect...\n') {
// work around https://github.com/nodejs/node/issues/34799 when running tests in the debugger
result.message = '';
result.pass = true;
Ms2ger marked this conversation as resolved.
Show resolved Hide resolved
}
const expectedFailure = expectedFailures.has(file);
const message = `${PREFIXES[+expectedFailure][+result.pass]} ${file} (${scenario})\n`;
stdout.write(message);
Expand Down