public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] math: Add LIBM_TEST_VERBOSE environment variable support.
@ 2024-05-07  0:34 Joe Simmons-Talbott
  2024-05-08 13:28 ` Carlos O'Donell
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Simmons-Talbott @ 2024-05-07  0:34 UTC (permalink / raw)
  To: libc-alpha; +Cc: Joe Talbott

From: Joe Talbott <joetalbott@gmail.com>

Allow the libm-test-driver based tests to have their verbosity set based
on the LIMB_TESt_VERBOSE environment variable.  This allows the entire
testsuite to be run with a non-default verbosity.
---
 math/libm-test-support.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/math/libm-test-support.c b/math/libm-test-support.c
index 1d60ac783b..a45686054f 100644
--- a/math/libm-test-support.c
+++ b/math/libm-test-support.c
@@ -1139,6 +1139,7 @@ libm_test_init (int argc, char **argv)
   int remaining;
   char *ulps_file_path;
   size_t dir_len = 0;
+  char *verbose_env;
 
   verbose = 1;
   output_ulps = 0;
@@ -1148,6 +1149,10 @@ libm_test_init (int argc, char **argv)
   /* XXX set to 0 for releases.  */
   ignore_max_ulp = 0;
 
+  verbose_env = getenv("LIBM_TEST_VERBOSE");
+  if (verbose_env != NULL)
+    verbose = (unsigned int) strtoul (verbose_env, NULL, 0);
+
   /* Parse and process arguments.  */
   argp_parse (&argp, argc, argv, 0, &remaining, NULL);
 
-- 
2.44.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-09  2:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-07  0:34 [PATCH] math: Add LIBM_TEST_VERBOSE environment variable support Joe Simmons-Talbott
2024-05-08 13:28 ` Carlos O'Donell
2024-05-09  2:31   ` Joe Simmons-Talbott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).