mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
[benchtests] Fix compare_strings.py for python2
Python 2 does not have a FileNotFoundError so drop it in favour of simply printing out the last (and most informative) line of the exception. * benchtests/scripts/compare_strings.py: Import traceback. (parse_file): Pretty-print error.
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
2018-08-02 Siddhesh Poyarekar <siddhesh@sourceware.org>
|
2018-08-02 Siddhesh Poyarekar <siddhesh@sourceware.org>
|
||||||
|
|
||||||
|
* benchtests/scripts/compare_strings.py: Import traceback.
|
||||||
|
(parse_file): Pretty-print error.
|
||||||
|
|
||||||
* NEWS: Mention the change.
|
* NEWS: Mention the change.
|
||||||
* elf/dl-tunables.list: Rename tune namespace to cpu.
|
* elf/dl-tunables.list: Rename tune namespace to cpu.
|
||||||
* sysdeps/powerpc/dl-tunables.list: Likewise.
|
* sysdeps/powerpc/dl-tunables.list: Likewise.
|
||||||
|
@@ -29,6 +29,7 @@ import os
|
|||||||
import json
|
import json
|
||||||
import pylab
|
import pylab
|
||||||
import argparse
|
import argparse
|
||||||
|
import traceback
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import jsonschema as validator
|
import jsonschema as validator
|
||||||
@@ -45,8 +46,8 @@ def parse_file(filename, schema_filename):
|
|||||||
bench = json.load(benchfile)
|
bench = json.load(benchfile)
|
||||||
validator.validate(bench, schema)
|
validator.validate(bench, schema)
|
||||||
return bench
|
return bench
|
||||||
except FileNotFoundError:
|
except:
|
||||||
sys.stderr.write('Invalid input file %s.\n' % filename)
|
print(traceback.format_exc(limit=1))
|
||||||
sys.exit(os.EX_NOINPUT)
|
sys.exit(os.EX_NOINPUT)
|
||||||
|
|
||||||
def draw_graph(f, v, ifuncs, results):
|
def draw_graph(f, v, ifuncs, results):
|
||||||
|
Reference in New Issue
Block a user