diff --git a/tests/gem5/insttest_se/ref/sparc/linux/insttest/simout b/tests/gem5/insttest_se/ref/simout similarity index 90% rename from tests/gem5/insttest_se/ref/sparc/linux/insttest/simout rename to tests/gem5/insttest_se/ref/simout index 81a0b927df..52e98cae09 100644 --- a/tests/gem5/insttest_se/ref/sparc/linux/insttest/simout +++ b/tests/gem5/insttest_se/ref/simout @@ -1,5 +1,4 @@ Global frequency set at 1000000000000 ticks per second -**** REAL SIMULATION **** Begining test of difficult SPARC instructions... LDSTUB: Passed SWAP: Passed diff --git a/tests/gem5/insttest_se/test.py b/tests/gem5/insttest_se/test.py index 0d86f47816..3dd9a33514 100644 --- a/tests/gem5/insttest_se/test.py +++ b/tests/gem5/insttest_se/test.py @@ -24,55 +24,46 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -''' +""" Test file for the insttest binary running on the SPARC ISA -''' +""" from testlib import * -test_progs = { - constants.sparc_tag : ('insttest',) -} +test_progs = {constants.sparc_tag: ("sparc-insttest",)} -cpu_types = { - constants.sparc_tag : ('AtomicSimpleCPU', 'TimingSimpleCPU') -} +cpu_types = {constants.sparc_tag: ("atomic", "timing")} -supported_os = { - constants.sparc_tag : ('linux',) -} +if config.bin_path: + resource_path = config.bin_path +else: + resource_path = joinpath(absdirpath(__file__), "..", "resources") -base_path = joinpath(config.bin_path, 'insttest') - -urlbase = config.resource_url + '/test-progs/insttest/bin/' for isa in test_progs: for binary in test_progs[isa]: - for operating_s in supported_os[isa]: - import os - url = urlbase + isa.lower() + '/' + operating_s + '/' + binary - path = joinpath(base_path, isa.lower(), operating_s, binary) + ref_path = joinpath(getcwd(), "ref", binary) + verifiers = ( + verifier.MatchStdoutNoPerf(joinpath(ref_path, "simout")), + ) - try: - program = DownloadedProgram(url, path, binary) - except: - continue - - ref_path = joinpath( - getcwd(), 'ref', isa.lower(), operating_s, binary + for cpu in cpu_types[isa]: + gem5_verify_config( + name="test-" + binary + "-" + cpu, + fixtures=(), + verifiers=verifiers, + config=joinpath( + config.base_dir, + "configs", + "example", + "components-library", + "simple_binary_run.py", + ), + config_args=[ + binary, + cpu, + "--override-download", + "--resource-directory", + resource_path, + ], + valid_isas=(isa,), + length=constants.long_tag, ) - verifiers = ( - verifier.MatchStdoutNoPerf(joinpath(ref_path, 'simout')), - ) - - for cpu in cpu_types[isa]: - - gem5_verify_config( - name='test-'+binary + '-' + operating_s + '-' + cpu, - fixtures=(program,), - verifiers=verifiers, - config=joinpath(config.base_dir, 'configs', - 'example','se.py'), - config_args=['--cmd', joinpath(path, binary), - '--cpu-type', cpu, '--caches'], - valid_isas=(isa,), - length = constants.long_tag, - )