Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorColin Ihrig <cjihrig@gmail.com>2022-04-04 17:14:49 +0300
committerGitHub <noreply@github.com>2022-04-04 17:14:49 +0300
commit54819f08e0c469528901d81a9cee546ea518a5c3 (patch)
treee1e9093b64489985f5c8f779e202b3f0e698b9af /src
parent0c9273d1266bbe67fcdc423913fc8c83c259aa83 (diff)
test_runner: support 'only' tests
This commit introduces a CLI flag and test runner functionality to support running a subset of tests that are indicated by an 'only' option passed to the test. PR-URL: https://github.com/nodejs/node/pull/42514 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/node_options.cc4
-rw-r--r--src/node_options.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/node_options.cc b/src/node_options.cc
index bb568ce458a..313fb219294 100644
--- a/src/node_options.cc
+++ b/src/node_options.cc
@@ -498,6 +498,10 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
"write warnings to file instead of stderr",
&EnvironmentOptions::redirect_warnings,
kAllowedInEnvironment);
+ AddOption("--test-only",
+ "run tests with 'only' option set",
+ &EnvironmentOptions::test_only,
+ kAllowedInEnvironment);
AddOption("--test-udp-no-try-send", "", // For testing only.
&EnvironmentOptions::test_udp_no_try_send);
AddOption("--throw-deprecation",
diff --git a/src/node_options.h b/src/node_options.h
index 7a73e6e5987..97e01a9435b 100644
--- a/src/node_options.h
+++ b/src/node_options.h
@@ -148,6 +148,7 @@ class EnvironmentOptions : public Options {
#endif // HAVE_INSPECTOR
std::string redirect_warnings;
std::string diagnostic_dir;
+ bool test_only = false;
bool test_udp_no_try_send = false;
bool throw_deprecation = false;
bool trace_atomics_wait = false;