diff --git a/tests/gem5/multi_isa/README.md b/tests/gem5/multi_isa/README.md deleted file mode 100644 index 1721ad59ec..0000000000 --- a/tests/gem5/multi_isa/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Multi ISA - -These tests check that all our ISAs are both currrently supported within gem5. - -To run these tests by themselves, you can run the following command in the tests directory: - -```bash -./main.py run gem5/multi_isa --length=[length] -``` diff --git a/tests/gem5/multi_isa/configs/runtime_isa_check.py b/tests/gem5/multi_isa/configs/runtime_isa_check.py deleted file mode 100644 index ffc50ee927..0000000000 --- a/tests/gem5/multi_isa/configs/runtime_isa_check.py +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright (c) 2022 The Regents of the University of California -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer; -# redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution; -# neither the name of the copyright holders nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -""" -This is a very simple script to test the output given by -`gem5.runtime.get_runtime_isa` -""" - -import argparse - -from gem5.isas import ( - ISA, - get_isa_from_str, - get_isas_str_set, -) -from gem5.runtime import get_runtime_isa - -parser = argparse.ArgumentParser( - description="A simple script used to check the output of " - "`gem5.runtime.get_runtime_isa`" -) - -parser.add_argument( - "-e", - "--expected-isa", - type=str, - choices=get_isas_str_set(), - required=True, - help="The expected ISA. If not returned by `get_runtime_isa`, a " - "non-zero exit code will be returned by the script", -) - -args = parser.parse_args() -runtime_isa = get_runtime_isa() -expected_isa = get_isa_from_str(args.expected_isa) - -if runtime_isa == expected_isa: - exit(0) - -print(f"ISA expected: {args.expected_isa}") -print(f"get_runtime_isa() returned: {runtime_isa.value}") - -exit(1) diff --git a/tests/gem5/multi_isa/configs/supported_isa_check.py b/tests/gem5/multi_isa/configs/supported_isa_check.py deleted file mode 100644 index 5b6dfc7c8a..0000000000 --- a/tests/gem5/multi_isa/configs/supported_isa_check.py +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright (c) 2022 The Regents of the University of California -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer; -# redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution; -# neither the name of the copyright holders nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -""" -This is a very simple script to test the output given by -`gem5.runtime.get_supported_isas` -""" - -import argparse -import os - -from gem5.isas import ( - get_isa_from_str, - get_isas_str_set, -) -from gem5.runtime import get_supported_isas - -parser = argparse.ArgumentParser( - description="A simple script used to check the output of " - "`gem5.runtime.get_supported_isas`" -) - -parser.add_argument( - "-e", - "--expected-isa", - type=str, - choices=get_isas_str_set(), - required=True, - help="An ISA expected to be included in the binary. If not returned by " - "`get_supported_isas`, a non-zero exit code will be returned by the " - "script", -) - -args = parser.parse_args() -supported_isas = get_supported_isas() -expected_isa = get_isa_from_str(args.expected_isa) - -if expected_isa in supported_isas: - exit(0) - -print(f"ISA expected: {args.expected_isa}") - -supported_isas_str = "" -for isa in supported_isas: - supported_isas += f"{os.linesep}{isa.value}" -print(f"get_supported_isas() returned:{supported_isas}") - -exit(1) diff --git a/tests/gem5/multi_isa/test_multi_isa.py b/tests/gem5/multi_isa/test_multi_isa.py deleted file mode 100644 index 2727fe43de..0000000000 --- a/tests/gem5/multi_isa/test_multi_isa.py +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright (c) 2022 The Regents of the University of California -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer; -# redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution; -# neither the name of the copyright holders nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -from testlib import * - -isa_map = { - "sparc": constants.sparc_tag, - "mips": constants.mips_tag, - "null": constants.null_tag, - "arm": constants.arm_tag, - "x86": constants.vega_x86_tag, - "power": constants.power_tag, - "riscv": constants.riscv_tag, -} - - -for isa in isa_map.keys(): - if isa in ("x86", "arm", "riscv"): - gem5_verify_config( - name=f"supported-isas-check_{isa}-compiled-alone", - verifiers=(), - fixtures=(), - config=joinpath( - config.base_dir, - "tests", - "gem5", - "multi_isa", - "configs", - "supported_isa_check.py", - ), - config_args=["-e", isa], - valid_isas=(isa_map[isa],), - valid_hosts=constants.supported_hosts, - length=constants.long_tag, - ) - - if isa != "null": - # The null isa is not "supported" in a case where other ISAs are - # present. - gem5_verify_config( - name=f"supported-isas-check_{isa}-all-compiled", - verifiers=(), - fixtures=(), - config=joinpath( - config.base_dir, - "tests", - "gem5", - "multi_isa", - "configs", - "supported_isa_check.py", - ), - config_args=["-e", isa], - valid_isas=(constants.all_compiled_tag,), - valid_hosts=constants.supported_hosts, - length=constants.quick_tag, - )