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