tools: optimize wildcard execution in tools/test.py by joyeecheung · Pull Request #60266 · nodejs/node

@joyeecheung

Previously for each matching test, it would execute multiple
`node -p` commands to decide the configurations of the executable.
That means if there are 100 tests matched, it will run the Node.js
executable 4*100 times to retrieve the same configurations repeatedly.
This changes the loop order so that it only execute these commands
once and reuse the results for all matching tests.

@nodejs-github-bot added test

Issues and PRs related to the tests.

tools

Issues and PRs related to the tools directory.

labels

Oct 15, 2025

legendecas

aduh95 pushed a commit that referenced this pull request

Oct 23, 2025
Previously for each matching test, it would execute multiple
`node -p` commands to decide the configurations of the executable.
That means if there are 100 tests matched, it will run the Node.js
executable 4*100 times to retrieve the same configurations repeatedly.
This changes the loop order so that it only execute these commands
once and reuse the results for all matching tests.

PR-URL: #60266
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

aduh95 pushed a commit that referenced this pull request

Oct 31, 2025
Previously for each matching test, it would execute multiple
`node -p` commands to decide the configurations of the executable.
That means if there are 100 tests matched, it will run the Node.js
executable 4*100 times to retrieve the same configurations repeatedly.
This changes the loop order so that it only execute these commands
once and reuse the results for all matching tests.

PR-URL: #60266
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

aduh95 pushed a commit that referenced this pull request

Oct 31, 2025
Previously for each matching test, it would execute multiple
`node -p` commands to decide the configurations of the executable.
That means if there are 100 tests matched, it will run the Node.js
executable 4*100 times to retrieve the same configurations repeatedly.
This changes the loop order so that it only execute these commands
once and reuse the results for all matching tests.

PR-URL: #60266
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request

Nov 3, 2025

aduh95 pushed a commit that referenced this pull request

Nov 7, 2025
Previously for each matching test, it would execute multiple
`node -p` commands to decide the configurations of the executable.
That means if there are 100 tests matched, it will run the Node.js
executable 4*100 times to retrieve the same configurations repeatedly.
This changes the loop order so that it only execute these commands
once and reuse the results for all matching tests.

PR-URL: #60266
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

aduh95 pushed a commit that referenced this pull request

Feb 17, 2026
Previously for each matching test, it would execute multiple
`node -p` commands to decide the configurations of the executable.
That means if there are 100 tests matched, it will run the Node.js
executable 4*100 times to retrieve the same configurations repeatedly.
This changes the loop order so that it only execute these commands
once and reuse the results for all matching tests.

PR-URL: #60266
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

aduh95 pushed a commit that referenced this pull request

Feb 19, 2026
Previously for each matching test, it would execute multiple
`node -p` commands to decide the configurations of the executable.
That means if there are 100 tests matched, it will run the Node.js
executable 4*100 times to retrieve the same configurations repeatedly.
This changes the loop order so that it only execute these commands
once and reuse the results for all matching tests.

PR-URL: #60266
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

aduh95 pushed a commit that referenced this pull request

Feb 17, 2026
Previously for each matching test, it would execute multiple
`node -p` commands to decide the configurations of the executable.
That means if there are 100 tests matched, it will run the Node.js
executable 4*100 times to retrieve the same configurations repeatedly.
This changes the loop order so that it only execute these commands
once and reuse the results for all matching tests.

PR-URL: #60266
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

aduh95 pushed a commit that referenced this pull request

Feb 19, 2026
Previously for each matching test, it would execute multiple
`node -p` commands to decide the configurations of the executable.
That means if there are 100 tests matched, it will run the Node.js
executable 4*100 times to retrieve the same configurations repeatedly.
This changes the loop order so that it only execute these commands
once and reuse the results for all matching tests.

PR-URL: #60266
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>