From: Martin Liska Date: Tue, 14 Sep 2021 10:41:29 +0000 (+0200) Subject: testsuite: fix failing pytest tests X-Git-Tag: upstream/12.2.0~5174 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e2103982da7be8781900653a5f7c5a5d0a57d38a;p=platform%2Fupstream%2Fgcc.git testsuite: fix failing pytest tests gcc/testsuite/ChangeLog: * g++.dg/gcov/gcov.py: Fix failing pytests as gcov.json.gz filename was changed in b777f228b481ae881a7fbb09de367a053740932c. --- diff --git a/gcc/testsuite/g++.dg/gcov/gcov.py b/gcc/testsuite/g++.dg/gcov/gcov.py index a8c4ea9..5137f3a 100644 --- a/gcc/testsuite/g++.dg/gcov/gcov.py +++ b/gcc/testsuite/g++.dg/gcov/gcov.py @@ -5,6 +5,9 @@ import os def gcov_from_env(): # return parsed JSON content a GCOV_PATH file - json_filename = os.environ['GCOV_PATH'] + '.gcov.json.gz' + json_filename = os.environ['GCOV_PATH'] + # strip extension + json_filename = json_filename[:json_filename.rindex('.')] + json_filename += '.gcov.json.gz' json_data = gzip.open(json_filename).read() return json.loads(json_data)