From: Siddhesh Poyarekar Date: Mon, 7 Aug 2017 19:26:10 +0000 (+0530) Subject: benchtests: Avoid a display error when running in text terminal X-Git-Tag: glibc-2.27~1218 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dd3e86ad7cf5ea1b5a42b7962732f98882c63ff8;p=thirdparty%2Fglibc.git benchtests: Avoid a display error when running in text terminal The compare_strings.py script generates a graph for the benchmarks it performs a comparison on and that fails if X is not available. Avoid the error and ensure that only the graph is generated and saved as a PNG file. * benchtests/scripts/compare_strings.py: Avoid display error when generating graph. --- diff --git a/ChangeLog b/ChangeLog index efdd9b6d85b..b64ed0571d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2017-08-07 Siddhesh Poyarekar + * benchtests/scripts/compare_strings.py: Avoid display error when + running on a text terminal. + * benchtests/scripts/compare_strings.py (main): Add an optional -base option. (process_results): New argument base_func. diff --git a/benchtests/scripts/compare_strings.py b/benchtests/scripts/compare_strings.py index 43e70ebee25..b3c57e2b34f 100755 --- a/benchtests/scripts/compare_strings.py +++ b/benchtests/scripts/compare_strings.py @@ -21,6 +21,8 @@ Given a string benchmark result file, print a table with comparisons with a baseline. The baseline is the first function, which typically is the builtin function. """ +import matplotlib as mpl +mpl.use('Agg') import sys import os