Commit Graph

1415 Commits

Author SHA1 Message Date
Bobby R. Bruce
ddf6cb88e4 misc: Run pre-commit run --all-files
This is reflect the updates made to black when running `pre-commit
autoupdate`.

Change-Id: Ifb7fea117f354c7f02f26926a5afdf7d67bc5919
2023-10-10 14:01:58 -07:00
Harshil Patel
3af3c1121b stdlib, resources: Addressed requested changes
Change-Id: I22abdc3bdcdde52301ed10cb3113e8925159c245
Co-authored-by: Kunal Pai <kunpai@users.noreply.github.com>
2023-10-02 23:27:32 -07:00
Harshil Patel
8182f8084b stdlib, resources, tests: Introduce Suite of Workloads
This patch introduces a new category called "suite".
A suite is a collection of workloads.
Each workload in a SuiteResource has a tag that can be narrowed down
through the function with_input_group.
Also, the set of input groups can be seen through list_input_groups.
Added unit tests to test all functions of SuiteResource class.

Change-Id: Iddda5c898b32b7cd874987dbe694ac09aa231f08

Co-authored-by: Kunal Pai <kunpai@ucdavis.edu>
2023-09-29 10:50:09 -07:00
Bobby R. Bruce
62d34ef374 misc: 'sim{out/err}' -> 'sim{out/err}.txt' (#250)
By default, the `--stderr-file` and `--stdout-file` arguments were
directing the simulator to output files named "simerr" and "simout"
respectively if an output redirect was requested.

A small annoyance is these files lack an extension meaning programs
refuse to open them, or don't do so withou additional effort. On many
systems they are assumed to scripts.

This patch adds the `.txt` extension to both, thus clearly indicating to
other programs these are text files and can be opened and read as such.
2023-09-27 17:36:03 -07:00
Bobby R. Bruce
391f62b213 misc: 'sim{out/err}' -> 'sim{out/err}.txt'
By default, the --stderr-file and --stdout-file arguments were
directing the simulator output to files named "simerr" and
"simout" respectively if an output redirect was requested.

A small annoyance is these files lack an extension meaning programs
refuse to open them, or to do so without some additional effort. On
many systems they are assumed to scripts.

This patch adds the .txt extension to both, thus clearly indicating
to other programs these are text files and can be opened to be read
as such.

Change-Id: Iff5af4a9e6966b4467d005a029dbf401099fbd35
2023-09-21 12:57:43 -07:00
Bobby R. Bruce
efd58f9b72 tests: Remove ":" from testing results output dir name
Colons in path names is not advisable.

Change-Id: I7748a36cabafde69759f7a9892f7b8910470b85e
2023-09-19 15:48:11 -07:00
Bobby R. Bruce
0337613afc ext,tests: Add --build-targets option to ./main.py list
This allows for build target information (i.e., the gem5 binary to be
built for the tests) to be returned.

Change-Id: I6638b54cbb1822555f58e74938d36043c11108ba
2023-09-19 15:48:10 -07:00
Bobby R. Bruce
c36a4d12aa tests: Replace print with testlib.log for PARSEC warn
Using just a print was causing this warning to print even with the `-q`
flag was passed. The `-q` flag sets the output to machine readable,
which the warning statement is not.

Change-Id: I139e2565dbc53aaee9027c0e003d34ba800a7ef4
2023-09-19 15:48:10 -07:00
Bobby R. Bruce
eb5ae35341 resources,stdlib: Add workload to resource specialization and deprecate workload.py (#212) 2023-09-07 12:45:45 -07:00
Harshil Patel
bbe96d6485 stdlib: Changed use of Workload to obtain_resource
- Changed files calling Workload class to call obtain_resoucre instead.

Change-Id: I41f5f0c3ccc7c08b39e7049eabef9609d6d68788
2023-09-06 10:06:16 -07:00
Harshil Patel
bf06d61c35 stdlib, tests, resources: Updated tests
- Updated workload tests to use WrokloadResource and obtain_resource

Change-Id: I39194e7fe764566a528e5141c29f30efa14e0cde
2023-09-05 12:39:38 -07:00
Bobby R. Bruce
c156df620d resources, stdlib: Add support for local files in obtain_resource (#204)
This patch allows a local JSON file to specify a local path in the JSON
object of a Resource, through the "url" field.

Local paths can be entered with the prefix "file:" in the "url" field.

If the local path exists, then the Resource from there is copied into
the resource directory defined in the
function earlier.

This behavior is the same as using specific Resource classes (ex.
BinaryResource) and passing a local_path into the function.

But, the above class does not allow simultaneous creation of local
Resources and Workloads of those local Resources.

With this patch, someone can use a local JSON, specify the location of
local Resources and create a Workload from those Resources and test both
together.
2023-08-29 20:35:40 -07:00
KUNAL PAI
d52c7ce87f resources, stdlib: Add support for local files in obtain_resource
This patch allows a local JSON file to specify a local path
in the JSON object of a Resource, through the "url" field.

Local paths can be entered with the prefix "file:" in "url".
All File URI scheme formats are supported.

This behavior is the same as using specific Resource classes
(ex. BinaryResource) and passing a local_path into the function.

But, the above infrastructure does not allow simultaneous
creation of Resources and Workloads of those Resources.

With this patch, someone can use a local JSON, specify the location
of local Resources and create a Workload from those Resources and
test both together.

Also, this patch adds pyunit tests to check the functionality
of the function used to convert the "url" field into a path.

Change-Id: I1fa3ce33a9870528efd7751d7ca24c27baf36ad4
2023-08-29 09:47:03 -07:00
Bobby R. Bruce
cf997c93a5 tests, gpu-compute: Updating weekly.sh to use mmapped version of FW (#186) 2023-08-24 10:16:25 -07:00
Roger Chang
f41172f9e4 tests: Add RV32 test binaries 2023-08-22 16:00:16 +08:00
Roger Chang
61488e1e17 tests: Add more tests for RV64 2023-08-22 16:00:16 +08:00
Roger Chang
fee1c3fc7a tests: Update asmtest script
Upload the config script to make it only for riscv asmtest and replace
Resource with obtain_resourse

Change-Id: I0bab96ea352b7ce1c6838203bfa13eee795f41f9
2023-08-22 16:00:16 +08:00
Bobby R. Bruce
d7d441becb tests: Add checkpoint tests for all ISAs (#167)
Added save and restore checkpoint tests for arm-hello, x86-hello,
x86-fs, power-hello

Added mips and sparc test but mips does not support checkpoint and there
is a bug in sparc.

Added test file to run the tests.
2023-08-18 15:01:39 -07:00
Harshil Patel
9d86a559ed tests: removed mips tests and added issue link.
- Removed MIPS tests.
- Added link to github issue sparc test bug.

Change-Id: Ib3c69dca578371ecf0ac2d7694f46f24834a7e5f
2023-08-18 09:51:40 -07:00
Bobby R. Bruce
c0216dbe48 stdlib: Allow passing of func as Exit Event generator
In this case the function is turned into a generator with the
"yield" of the generator the return the function's execution.

Change-Id: I4b06d64c5479638712a11e3c1a2f7bd30f60d188
2023-08-17 16:48:33 -07:00
Harshil Patel
b19d4beeb8 tests: Removed mips checkpoint tests
Change-Id: I03ad0025ec982245721fd7faad8d75cdbb99cf81
2023-08-11 09:00:11 -07:00
Bobby R. Bruce
fa918f61d1 tests: Move replacement policy and simulator config files (#173)
Moving these files should address the failures in the daily tests.
2023-08-11 07:39:06 -07:00
Melissa Jost
912b7c06dd tests: Move replacement policy and simulator config files
Moving these files should address the failures in the daily
tests.

Change-Id: I438adba1a45bdf6083651b6b3f610c8bbe4ebdf0
2023-08-10 16:38:20 -07:00
James Braun
da87f65e4a Updating weekly.sh to use mmapped version of FW
Change-Id: Id0059d9b3e9e4a4db3ba59793c41ae71269666ae
2023-08-09 23:05:58 -05:00
Harshil Patel
a880ff1e15 tests: Updated directory structure
-Changed copyright message to reflect correct year.
- Updated directory structure.
- Changed directory name to snake case.
- Added a README.md for checkpoint tests.

Change-Id: Id350addb9cce6740a20a5a45171f80306b711efa
2023-08-08 13:38:56 -07:00
Harshil Patel
a903ff43f2 tests: Add checkpoint tests for all ISAs
Added save and restore checkpoint tests for arm-hello, x86-hello, x86-fs, power-hello
Added mips and sparc test but mips does not support checkpoint and there is a bug in sparc.
Added test file to run the tests.

Change-Id: I2d3b96f95ee08aae921de9a885ac5be77d49f326
2023-08-08 09:42:41 -07:00
Bobby R. Bruce
dc31883a2d tests: Update resource downloading test to skip x86-parsec
The x86-parsec gem5 Resource (v1.0.0,
http://resources.gem5.org/resources/x86-parsec?version=1.0.0) is 33GB.
The gem5 GitHub Actions self-hosted runners do not have enough Disk
Space in the VMs they are run to download this. Ergo we skip it.

Change-Id: I290fe265f03ceca65b2bed87e9f4a4ad601e0fc1
2023-08-07 15:30:09 -07:00
Bobby R. Bruce
b86bc7b1ed tests: Add '--skip' arg to "download_check.py"
This argument allows the passing of IDs of resources which should be
skipped for this check.

Note: A current limitation here is you cannot specify the version of a
resource. Passing the ID of a resource to this will skip the downloading
for all versions of that resource.

Change-Id: Ifdb7c2b71553126fd52a3d286897ed5dd8e98f7c
2023-08-07 15:30:09 -07:00
Bobby R. Bruce
f21c5d0d78 tests: Disable PARSEC benchmark tests
These tests are disabled due our GitHub Actions self-hosted Runners
having a 60GB of disk space. The PARSEC Disk Image Resource (v1.0.0,
http://resources.gem5.org/resources/x86-parsec?version=1.0.0) is 33GB
and is simply too big to download and unzip for these tests.

These tests can be reenabled when this issue is resolved.

Change-Id: I9a63aa1903cea3ce7942bdc85bcd0b24761d2f29
2023-08-07 15:30:08 -07:00
Melissa Jost
effca10cb4 tests: Add switcheroo.py to fs configs directory
There was another missing file in the configs for the fs tests,
so this should allow the switcheroo tests to pass.

Change-Id: Ic4e26cceeb9209f176158b80eaaba88b47968c39
2023-08-04 17:57:51 -07:00
Melissa Jost
bd6a1f5b4b Merge branch 'develop' into refactor-test-configs 2023-08-04 14:54:30 -07:00
Melissa Jost
4376e5fa9f tests: Add checkpoint.py to fs tests directory
The configs directory for the fs tests was missing the
checkpoint.py file, causing some of the CI tests to fail.

Change-Id: Ifbd775ad658f96d06bea7bee554fe3bedcf5a5b5
2023-08-04 14:19:49 -07:00
Bobby R. Bruce
0855c58538 tests: download_check.py to rm each resource after check
"tests/gem5/configs/download_check.py" is used by the
"test-resource-downloading" test (defined in
"tests/gem5/gem5-resources/test_download_resources.py" and ran as part
of the "very-long" suite).

Prior to this change "download_check.py" would download each resource,
check it's md5, then at the end of the script remove all the downloaded
resources. This is inefficient on disk space and was causing our
"very-long" suite of tests to require a machines with a lot of disk
space to run.

This change alters 'download_check.py" to remove each resource after the
md5 check. Thus, only one resource is ever downloaded and present at any
given time during the running of this script.

Change-Id: I38fce100ab09f66c256ccddbcb6f29763839ac40
2023-08-03 10:48:44 -07:00
Melissa Jost
3bf92d0e0b tests: Update layout of testing directory
This changeset reorganizes the testing directory within gem5,
removing the bigger config folders, then replacing them with
smaller configs folders within each directory containing only
the scripts necessary for that set of tests. It also changes
the locations of the config scripts used in each set of tests,
and updates the tests accordingly.

Change-Id: I38297d4496f72bd5cf7200471acd5c4d93002b27
2023-08-02 14:59:13 -07:00
Melissa Jost
7ff67459b6 tests: Add READMEs to the testing directory
This change adds READMEs to each directory within tests/gem5,
with a short description of the test, as well as how to run it.

Change-Id: I574ebcdc837848b52f21e8c0f8856ff09463284b
2023-08-02 14:58:39 -07:00
Melissa Jost
57fff0221b tests: Unify testing directory names
This updates the testing directory so everything uses underscores
and is more uniform.

Change-Id: I7ea45c9e0fc1892605387cd2453ce8656ddccd49
2023-08-02 14:58:20 -07:00
Bobby R. Bruce
ce8e1b6aaa tests: Deprecate Gerrit/Jenkins testing scripts
These testing scripts are no longer used since moving to GitHub. The
Nightly (now refered to as "Daily" tests), the Weekly Tests, Compiler
Tests and the CI (Kokoro, pre-commit) tests are run via the GitHub
Actions infrastructure. Their setup is described via Workflow files
in ".github/workflows". To run tests locally please consult the
"TESTING.md" file.

These scripts may still be useful to reference and are therefore being
moved into a deprecated state.

Change-Id: Ie75c2f4f1179eb73d0f45ba0b259e8d79aa02ace
2023-07-26 10:54:57 -07:00
Bobby R. Bruce
01623fac68 stdlib,configs,tests: Remove deprecated Resource classes usage (#102)
* stdlib,configs,tests: Remove `Resource` class use

This class is deprecated, but was still used in various example
configuration scriots and tests. This patch replaces it with the
`obtain_resource` function.

Change-Id: I0c89bf17783ccaaafc18072aaeefb5d1e207bc55

* configs: Remove `CustomDiskImageResource` use

The class is deprecated but was still used in the SPEC example scripts.
This patch replaces it with the `DiskImageResource` class.

Change-Id: Ie0697fe59a3d737b05eb45ff3bc964f42b0387e0

* configs,tests: Remove `CustomResource` use

This class is deprecated but was still used in example scripts and
mentioned, incorrectly, in comments in the pyunit tests. This patch
removes these.

Change-Id: Icb6d02f47a5b72cd58551e5dcd59cc72d6a91a01

* stdlib: Remove '\' in Workload docstring example

This example shows how to use the Workload. The backslash is not correct Python and would fail if used in this way.

Co-authored-by: Jason Lowe-Power <jason@lowepower.com>

---------

Co-authored-by: Jason Lowe-Power <jason@lowepower.com>
2023-07-20 23:08:39 -07:00
Kunal Pai
3c6563d6f7 stdlib: Change resource compatibility warning (#91)
* stdlib: Change resource compatibility warning

If the gem5 version is "develop", the warning will not
be thrown.

Change-Id: Id2be1c4323c6ca06c5503c2885c1608f8d119420

* stdlib: Change resource compatibility warning

If the gem5 version is "develop", the warning will not
be thrown.

Change-Id: Id2be1c4323c6ca06c5503c2885c1608f8d119420

* tests: Edit obtain_resources warning test

Since we are editing the warning message for
the develop branch, the test removes the
warning message as well.

Change-Id: I90882340188360bb3435344cdc14b324412c6c0e

---------

Co-authored-by: Jason Lowe-Power <jason@lowepower.com>
2023-07-20 12:00:49 -07:00
Bobby R. Bruce
65fc9a6bfa misc: Drop older compilers and Ubuntu 18.04 (#80)
* tests,util-docker,misc: Drop compiler support for GCC 7

Change-Id: I8b17b77c92b88e78a8cb6d38cd5f045dbe80a643

* tests,util-docker,misc: Drop compiler support for clang 6.0

Change-Id: Ie3b6bfe889ad1d119cee0c9ffb04c5996517922e

* util-docker,tests,misc: Remove Ubuntu 18.04 support

18.04 is no longer supported. This patch removes specific 18.04 compiler
tests and removes our 18.04 dockerfiles. Images will no longer be
produced for specific 18.04 tasks.

Compiler images for GCC and Clang, which used 18.04 have been updated to
use 20.04.

Change-Id: I6338ab47af3287a25a557dbbeaeebcfccfdec9fc
2023-07-18 10:28:09 -07:00
Bobby R. Bruce
bc99a6e346 tests: Improve Pyunit tests gem5 Resources' downloads (#79)
* tests: Remove large files from resource specialization tests

These tests were downloading resources (but not actually using them) to
ensure the `obtain_resources` function returned the correct
specialization and was parsing the data correctly. As these resources
were never used, this patch removes the downloading of large files in
this case, replacing them with smaller binaries.

Change-Id: I7b33aa6be8ec65b296b470cd50b128c084f2b71f

* tests: Rename 'looppoint-json...' example specailization

Appending '-example' to the end avoids any name clashes.
'looppoint-json-restore-resources-region-1' shares this ID with a real
resources in gem5 Resources.

Change-Id: I9853e97cb71e768c46ad173b5a497609f4acc3b2

* tests: Remove disk image download from Workload Checks

This download is big and unecessary (the workload is never run as part
of the test). This patch changes this test to instead download a small
binary in it's palce (again, this does not matter as this is never
actually run as a disk image).

Change-Id: I74034ebcf5f2501917847c258570e88a8f653a5d

* tests: Update IDs in Pyunit Workload checks

Some of these IDs clash with real workloads/resources in gem5 Resources.
To avoid any possible clashes or confusions, all the mock
resources/workloads in this suite of tests has been renamed with
'-example' appending on the end of the ID.

Change-Id: Ifd907b2321416bf05e8c4e646024d179da2ca487
2023-07-14 06:31:34 -07:00
Bobby R. Bruce
753933d471 gpu-compute, tests: Fix GPU_X86 compilation, add compiler tests (#64)
* gpu-compute: Remove use of 'std::random_shuffle'

This was deprecated in C++14 and removed in C++17. This has been
replaced with std::random. This has been implemented to ensure
reproducible results despite (pseudo)random behavior.

Change-Id: Idd52bc997547c7f8c1be88f6130adff8a37b4116

* dev-amdgpu: Add missing 'overrides'

This causes warnings/errors in some compilers.

Change-Id: I36a3548943c030d2578c2f581c8985c12eaeb0ae

* dev: Fix Linux specific includes to be portable

This allows for compilation in non-linux systems (e.g., Mac OS).

Change-Id: Ib6c9406baf42db8caaad335ebc670c1905584ea2

* tests: Add 'VEGA_X86' build target to compiler-tests.sh

Change-Id: Icbf1d60a096b1791a4718a7edf17466f854b6ae5

* tests: Add 'GCN3_X86' build target to compiler-tests.sh

Change-Id: Ie7c9c20bb090f8688e48c8619667312196a7c123
2023-07-11 14:35:03 -07:00
Melissa Jost
eb07d3fcf4 misc: Update documentation and links for GitHub
This changes mentions of googlesource and Gerrit to instead
link to the gem5 GitHub repository, and updates the documentation
to reflect the GitHub review process.

Change-Id: I5dc1d9fcf6b96f9e5116802f938b7e3bb5b09567
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71878
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2023-07-10 22:57:28 +00:00
Bobby R. Bruce
c9ff8ef57d stdlib,tests: Add Simulator Exit Event handler tests
Change-Id: Ib5f119730299c0f201a14a9e9bb933d23d65ac62
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62751
Reviewed-by: Melissa Jost <mkjost@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2023-07-10 22:56:54 +00:00
Bobby R. Bruce
c5f9daa86c stdlib,tests: Fix download_check.py
This was causing the Weekly tests to fail. The removing of the download
directory should only happen at the end. Prior to this patch it was
deleted and then referenced, which caused problems.

Change-Id: I134782e89a13f5c3cd5c1912ad53a701d0413d16
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/72019
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2023-07-07 15:52:52 +00:00
Bobby R. Bruce
aff1e7b64c stdlib: Refactor gem5 Vision/gem5-resources code
This patch includes several changes to the gem5 tools interface to the
gem5-resources infrastructure. These are:

* The old download and JSON query functions have been removed from the
  downloader module. These functions were used for directly downloading
  and inspecting the resource JSON file, hosted at
  https://resources.gem5.org/resources. This information is now obtained
  via `gem5.client`. If a resources JSON file is specified as a client,
  it should conform to the new schema:
  https//resources.gem5.org/gem5-resources-schema.json. The old schema
  (pre-v23.0) is no longer valid. Tests have been updated to reflect
  this change. Those which tested these old functions have been removed.
* Unused imports have been removed.
* For the resource query functions, and those tasked with obtaining the
  resources, the parameter `gem5_version` has been added. In all cases
  it does the same thing:
    * It will filter results based on compatibility to the
      `gem5_version` specified. If no resources are compatible the
      latest version of that resource is chosen (though a warning is
      thrown).
    * By default it is set to the current gem5 version.
    * It is optional. If `None`, this filtering functionality is not
      carried out.
    * Tests have been updated to fix the version to “develop” so the
      they do not break between versions.
* The `gem5_version` parameters will filter using a logic which will
  base compatibility on the specificity of the gem5-version specified in
  a resource’s data. If a resource has a compatible gem5-version of
  “v18.4” it will be compatible with any minor/hotfix version within the
  v18.4 release (this can be seen as matching on “v18.4.*.*”.) Likewise,
  if a resource has a compatible gem5-version of “v18.4.1” then it’s
  only compatible with the v18.4.1 release but any of it’s hot fix
  releases (“v18.4.1.*”).
* The ‘list_resources’ function has been updated to use the
  “gem5.client” APIs to get resource information from the clients
  (MongoDB or a JSON file). This has been designed to remain backwards
  compatible to as much as is possible, though, due to schema changes,
  the function does search across all versions of gem5.
* `get_resources` function was added to the `AbstractClient`. This is a
   more general function than `get_resource_by_id`. It was
  primarily created to handle the `list_resources` update but is a
  useful update to the API. The `get_resource_by_id` function has been
  altered to function as a wrapped to the `get_resources` function.
* Removed “GEM5_RESOURCE_JSON” code has been removed. This is no longer
  used.
* Tests have been cleaned up a little bit to be easier to read.
* Some docstrings have been updated.

Things that are left TODO with this code:

* The client_wrapper/client/abstract_client abstractions are rather
  pointless. In particular the client_wrapper and client classes could
  be merged.
* The downloader module no longer does much and should have its
  functions merged into other modules.
* With the addition of the `get_resources` function, much of the code in
  the `AbstractClient` could be simplified.

Change-Id: I0ce48e88b93a2b9db53d4749861fa0b5f9472053
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71506
Reviewed-by: Kunal Pai <kunpai@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
(cherry picked from commit 82587ce71b)
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71739
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2023-06-16 16:43:58 +00:00
Mahyar Samani
8a6ee4cab3 tests: Reducing json stat dump size.
This change reduces the number of stats dumped as json in
traffic_gen tests.

Change-Id: I94becb2e6d5da6096271cf7893ff2b380314da06
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71402
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
(cherry picked from commit f78471fb81)
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71438
2023-06-16 00:48:59 +00:00
KUNAL PAI
25d7badcc1 tests: Fix bugs related to gem5 Vision
This patch fixes refs under tests/pyunit/stdlib/resources.

Removes instances of {url_base} in refs.

Also, renames two refs: mongo_mock and mongo_dup_mock
to mongo-mock and mongo-dup-mock to follow naming
convention of other refs.

Change-Id: If115114bc7a89764e7c546b77a93d36d6a3b5f8a
Co-authored-by: Parth Shah <helloparthshah@gmail.com>
Co-authored-by: Harshil2107 <harshilp2107@gmail.com>
Co-authored-by: aarsli <arsli@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71360
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2023-06-08 02:56:33 +00:00
Kunal Pai
ffbf73db1d stdlib, tests, configs: Introduce gem5 Vision to resources
This patch makes changes to the stdlib based on the gem5 Vision project.
Firstly, a MongoDB database is supported.
A JSON database's support is continued.
The JSON can either be a local path or a raw GitHub link.

The data for these databases is stored in src/python
under "gem5-config.json".
This will be used by default.
However, the configuration can be overridden:
- by providing a path using the GEM5_CONFIG env variable.
- by placing a gem5-config.json file in the current working directory.

An AbstractClient is an abstract class that implements
searching and sorting relevant to the databases.

Clients is an optional list that can be passed
while defining any Resource class and obtain_resource.
These databases can be defined in the config JSON.

Resources now have versions. This allows for a
single version, e.g., 'x86-ubuntu-boot', to have
multiple versions. As such, the key of a resource is
its ID and Version (e.g., 'x86-ubuntu-boot/v2.1.0').
Different versions of a resource might be compatible
with different versions of gem5.

By default, it picks the latest version compatible with the gem5 Version
of the user.

A gem5 resource schema now has additional fields.
These are:
- source_url: Stores URL of GitHub Source of the resource.
- license: License information of the resource.
- tags: Words to identify a resource better, like hello for hello-world
- example_usage: How to use the resource in a simulation.
- gem5_versions: List of gem5 versions that resource is compatible with.
- resource_version: The version of the resource itself.
- size: The download size of the resource, if it exists.
- code_examples: List of objects.
These objects contain the path to where a resource is
used in gem5 example config scripts,
and if the resource itself is used in tests or not.
- category: Category of the resource, as defined by classes in
src/python/gem5/resources/resource.py.

Some fields have been renamed:
- "name" is changed to "id"
- "documentation" is changed to "description"

Besides these, the schema also supports resource specialization.
It adds fields relevant to a specific resource as specified in
src/python/gem5/resources/resource.py
These changes have been made to better present
information on the new gem5 Resources website.

But, they do not affect the way resources are used by a gem5 user.
This patch is also backwards compatible.
Existing code doesn't break with this new infrastructure.

Also, refs in the tests have been changed to match this new schema.
Tests have been changed to work with the two clients.

Change-Id: Ia9bf47f7900763827fd5e873bcd663cc3ecdba40
Co-authored-by: Kunal Pai <kunpai@ucdavis.edu>
Co-authored-by: Parth Shah <helloparthshah@gmail.com>
Co-authored-by: Harshil Patel <harshilp2107@gmail.com>
Co-authored-by: aarsli <arsli@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/70858
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2023-06-06 03:30:50 +00:00
Bobby R. Bruce
4198d027ac tests,systemc: Fix nightly systemc test
This fixes these nightly failing tests:
https://jenkins.gem5.org/job/nightly/609/

Due to this commit:
https://gem5-review.googlesource.com/c/public/gem5/+/68758
The source files are not copied to the "build" directory by default.
This caused the systemc tests to fail as the
"util/systemc/gem5_within_systemc/Makefile" depends on generated source
files in the "build" directory.

This patch adds the "--duplicate-sources" flag to the building of the
ARM binaries necessisary for running systemc. The README has been
updated to reflect this.

Change-Id: I3006005e43276097be98f7d4685f3d98c180d3f9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/70860
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2023-05-23 03:14:55 +00:00