From 99da7fbe11bb2e9e7b1ac6ebde3553372af0e475 Mon Sep 17 00:00:00 2001 From: Pietro Marchini Date: Wed, 20 Aug 2025 21:33:00 +0200 Subject: [PATCH] tools: avoid parsing test files twice PR-URL: https://github.com/nodejs/node/pull/59526 Reviewed-By: Antoine du Hamel Reviewed-By: Marco Ippolito --- tools/test.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/test.py b/tools/test.py index e27222af3ac..59801e1b074 100755 --- a/tools/test.py +++ b/tools/test.py @@ -788,6 +788,11 @@ def Execute(args, context, timeout=None, env=None, disable_core_files=False, for key, value in env.items(): env_copy[key] = value + # We append NODE_SKIP_FLAG_CHECK (ref: test/common/index.js) + # to avoid parsing the test files twice when looking for + # flags or environment variables defined via // Flags: and // Env: + env_copy["NODE_SKIP_FLAG_CHECK"] = "true" + preexec_fn = None def disableCoreFiles():