diff options
author | Jason Lowe-Power <jason@lowepower.com> | 2019-03-15 09:23:51 -0700 |
---|---|---|
committer | Jason Lowe-Power <jason@lowepower.com> | 2019-03-21 15:57:10 +0000 |
commit | 19eb23f12ef6f8d951c880b7b5b1a212703b0ccd (patch) | |
tree | 0ac5ac59c0b6f08b477c288c5ebb8aec59615728 /tests | |
parent | ee0e0ff6a01f135d14ac93e73eb7e1f5affcfbc1 (diff) | |
download | gem5-19eb23f12ef6f8d951c880b7b5b1a212703b0ccd.tar.xz |
tests: Use full path for DownloadedProgram
Change-Id: I1dceca80a425293d64f81b06ddff499363f18bc0
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17454
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gem5/fixture.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/gem5/fixture.py b/tests/gem5/fixture.py index c4fd12f52..97aab46f5 100644 --- a/tests/gem5/fixture.py +++ b/tests/gem5/fixture.py @@ -221,12 +221,23 @@ class DownloadedProgram(Fixture): urlbase = "http://gem5.org/dist/current/" def __init__(self, path, program, **kwargs): + """ + path: string + The path to the directory containing the binary relative to + $GEM5_BASE/tests + program: string + The name of the binary file + """ super(DownloadedProgram, self).__init__("download-" + program, build_once=True, **kwargs) self.program_dir = path - self.path = joinpath(self.program_dir, program) - self.url = self.urlbase + self.path + relative_path = joinpath(self.program_dir, program) + self.url = self.urlbase + relative_path + self.path = os.path.realpath( + joinpath(absdirpath(__file__), '../', relative_path) + ) + def _download(self): import urllib import errno |