From: mupton Date: Mon, 26 Oct 2020 21:58:22 +0000 (-0700) Subject: tests: fix dezip of ubuntu images in long regr X-Git-Tag: develop-gem5-snapshot~554 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=40d28262cb91224702a1ea6dcf882e3637b96f4e;p=gem5.git tests: fix dezip of ubuntu images in long regr needed to change output open from 'w' to 'wb' to write binary format Change-Id: Ia176d86a8ab8cc083ffc9508e051b667936eca2c Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/36615 Reviewed-by: Jason Lowe-Power Reviewed-by: Bobby R. Bruce Maintainer: Jason Lowe-Power Maintainer: Bobby R. Bruce Tested-by: kokoro --- diff --git a/tests/gem5/fixture.py b/tests/gem5/fixture.py index e8a67b803..467eb4303 100644 --- a/tests/gem5/fixture.py +++ b/tests/gem5/fixture.py @@ -297,7 +297,7 @@ class DownloadedProgram(UniqueFixture): gzipped_filename = self.filename + ".gz" urllib.request.urlretrieve(self.url, gzipped_filename) - with open(self.filename, 'w') as outfile: + with open(self.filename, 'wb') as outfile: with gzip.open(gzipped_filename, 'r') as infile: shutil.copyfileobj(infile, outfile)