diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2023-02-17 10:29:01 +0000 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2023-02-17 10:29:01 +0000 |
commit | 40619cbb3bf32872df8c53cc457039229428a263 (patch) | |
tree | 877ee55e67394f33550e22f0eda8bad463d155f2 /source/verCases_common.c | |
parent | 5a59dcec19327396a011a17fd924aed4fec416b3 (diff) | |
download | berkeley-testfloat-3-40619cbb3bf32872df8c53cc457039229428a263.zip berkeley-testfloat-3-40619cbb3bf32872df8c53cc457039229428a263.tar.gz berkeley-testfloat-3-40619cbb3bf32872df8c53cc457039229428a263.tar.bz2 |
All verbosity reduction in the testfloat code
By itself this has no effect as the flag never gets altered by the
original code. However QEMU's fp-test program directly include the
test float code and that will shortly gain the ability to twiddle this
flag.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'source/verCases_common.c')
-rw-r--r-- | source/verCases_common.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/source/verCases_common.c b/source/verCases_common.c index f1e3385..adc25db 100644 --- a/source/verCases_common.c +++ b/source/verCases_common.c @@ -55,6 +55,7 @@ uint_fast32_t verCases_maxErrorCount = 0; bool verCases_errorStop = false; volatile sig_atomic_t verCases_stop = false; +int verCases_verbosity = 1; bool verCases_anyErrors = false; @@ -70,15 +71,17 @@ uint_fast32_t verCases_tenThousandsCount, verCases_errorCount; void verCases_writeTestsPerformed( int count ) { - if ( verCases_tenThousandsCount ) { - fprintf( - stderr, - "\r%lu%04d tests performed", - (unsigned long) verCases_tenThousandsCount, - count - ); - } else { - fprintf( stderr, "\r%d tests performed", count ); + if ( verCases_verbosity) { + if ( verCases_tenThousandsCount ) { + fprintf( + stderr, + "\r%lu%04d tests performed", + (unsigned long) verCases_tenThousandsCount, + count + ); + } else { + fprintf( stderr, "\r%d tests performed", count ); + } } if ( verCases_errorCount ) { fprintf( @@ -88,7 +91,9 @@ void verCases_writeTestsPerformed( int count ) (verCases_errorCount == 1) ? "" : "s" ); } else { - fputs( ".\n", stderr ); + if ( verCases_verbosity) { + fputs( ".\n", stderr ); + } if ( verCases_tenThousandsCount ) { fprintf( stdout, @@ -114,9 +119,10 @@ void verCases_perTenThousand( void ) verCases_writeTestsPerformed( 0 ); verCases_exitWithStatus(); } - fprintf( - stderr, "\r%3lu0000", (unsigned long) verCases_tenThousandsCount ); - + if (verCases_verbosity) { + fprintf( + stderr, "\r%3lu0000", (unsigned long) verCases_tenThousandsCount ); + } } void verCases_writeErrorFound( int count ) |