From: Bobby R. Bruce Date: Tue, 26 May 2020 22:42:37 +0000 (-0700) Subject: python,test: Fixed boot test in python3 by removing map X-Git-Tag: v20.0.0.0~6 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5ad159ea323666640dc3d2e44069ab79c10f8904;p=gem5.git python,test: Fixed boot test in python3 by removing map In Python3 `map(lambda c: c.createThreads(), self.cpu)` does not execute `c.createThreads()`. This has been replaced with a for-loop which does work. Without this fix, the boot tests do not run in python3. Change-Id: I50d6c85ec4435ee04e248ea8bc4a3b4cc17c88fa Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29456 Tested-by: kokoro Reviewed-by: Jason Lowe-Power Reviewed-by: Anthony Gutierrez Maintainer: Jason Lowe-Power --- diff --git a/tests/gem5/x86-boot-tests/system/system.py b/tests/gem5/x86-boot-tests/system/system.py index c55664e97..bffd08a72 100755 --- a/tests/gem5/x86-boot-tests/system/system.py +++ b/tests/gem5/x86-boot-tests/system/system.py @@ -118,7 +118,8 @@ class MySystem(System): else: m5.fatal("No CPU type {}".format(cpu_type)) - map(lambda c: c.createThreads(), self.cpu) + for c in self.cpu: + c.createThreads() def setDiskImages(self, img_path_1, img_path_2): disk0 = CowDisk(img_path_1)