tests: Standardized test resources download dir
We were downloading resources to various different locations, for no real reason. This standardizes the process. From this commit onwards, all testing resources are downloaded to `tests/gem5/resources` by default. This may be overriden via the `--bin-path` TestLib argument. Note: In order to do this I have changed the meaning of the `bin-path` TestLib argument slightly. Previously the `bin-path` assumed a flat (non-existant) hierarchy. A simple directory of local resources. This new bin-path functionality maintains logical sub-directories. This is technically an API change and will be noted in the release notes. Change-Id: I4df85c121fa65f787fd71f03d74361afea121380 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33145 Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
@@ -215,6 +215,10 @@ def define_defaults(defaults):
|
||||
os.pardir))
|
||||
defaults.result_path = os.path.join(os.getcwd(), '.testing-results')
|
||||
defaults.resource_url = 'http://dist.gem5.org/dist/develop'
|
||||
defaults.resource_path = os.path.abspath(os.path.join(defaults.base_dir,
|
||||
'tests',
|
||||
'gem5',
|
||||
'resources'))
|
||||
|
||||
def define_constants(constants):
|
||||
'''
|
||||
@@ -569,8 +573,8 @@ def define_common_args(config):
|
||||
Argument(
|
||||
'--bin-path',
|
||||
action='store',
|
||||
default=None,
|
||||
help='Path where binaries are stored (downloaded if not present)'
|
||||
default=config._defaults.resource_path,
|
||||
help='Path where resources are stored (downloaded if not present)'
|
||||
),
|
||||
Argument(
|
||||
'--resource-url',
|
||||
|
||||
Reference in New Issue
Block a user