]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
benchtests: Avoid a display error when running in text terminal
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Mon, 7 Aug 2017 19:26:10 +0000 (00:56 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Mon, 7 Aug 2017 19:26:10 +0000 (00:56 +0530)
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.

ChangeLog
benchtests/scripts/compare_strings.py

index efdd9b6d85bbb9c1512aeda2a9c4912eec8645d3..b64ed0571d26f999878c30b3b98ea60eb291d579 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2017-08-07  Siddhesh Poyarekar  <siddhesh@sourceware.org>
 
+       * 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.
index 43e70ebee25cf4cd9144587c2fc7a31c1ed6d269..b3c57e2b34f649c09f65faf610909b19cfa1bdbe 100755 (executable)
@@ -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