tests: fix dezip of ubuntu images in long regr
authormupton <michaelupton@gmail.com>
Mon, 26 Oct 2020 21:58:22 +0000 (14:58 -0700)
committermike upton <michaelupton@gmail.com>
Tue, 27 Oct 2020 16:10:14 +0000 (16:10 +0000)
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 <power.jg@gmail.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
tests/gem5/fixture.py

index e8a67b803da81f64a9d8f524e0404d6e03ca8d29..467eb4303330f5ced9241d693f2cea0380baac6f 100644 (file)
@@ -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)