testsuite: fix failing pytest tests

gcc/testsuite/ChangeLog:

	* g++.dg/gcov/gcov.py: Fix failing pytests as gcov.json.gz
	  filename was changed in b777f228b4.
This commit is contained in:
Martin Liska 2021-09-14 12:41:29 +02:00
parent bd55fa1027
commit e2103982da
1 changed files with 4 additions and 1 deletions

View File

@ -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)