112885Sspwilson2@wisc.edu# Copyright (c) 2017 Mark D. Hill and David A. Wood 212885Sspwilson2@wisc.edu# All rights reserved. 312885Sspwilson2@wisc.edu# 412885Sspwilson2@wisc.edu# Redistribution and use in source and binary forms, with or without 512885Sspwilson2@wisc.edu# modification, are permitted provided that the following conditions are 612885Sspwilson2@wisc.edu# met: redistributions of source code must retain the above copyright 712885Sspwilson2@wisc.edu# notice, this list of conditions and the following disclaimer; 812885Sspwilson2@wisc.edu# redistributions in binary form must reproduce the above copyright 912885Sspwilson2@wisc.edu# notice, this list of conditions and the following disclaimer in the 1012885Sspwilson2@wisc.edu# documentation and/or other materials provided with the distribution; 1112885Sspwilson2@wisc.edu# neither the name of the copyright holders nor the names of its 1212885Sspwilson2@wisc.edu# contributors may be used to endorse or promote products derived from 1312885Sspwilson2@wisc.edu# this software without specific prior written permission. 1412885Sspwilson2@wisc.edu# 1512885Sspwilson2@wisc.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1612885Sspwilson2@wisc.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1712885Sspwilson2@wisc.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1812885Sspwilson2@wisc.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1912885Sspwilson2@wisc.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2012885Sspwilson2@wisc.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2112885Sspwilson2@wisc.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2212885Sspwilson2@wisc.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2312885Sspwilson2@wisc.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2412885Sspwilson2@wisc.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2512885Sspwilson2@wisc.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2612885Sspwilson2@wisc.edu# 2712885Sspwilson2@wisc.edu# Authors: Sean Wilson 2812885Sspwilson2@wisc.edu 2912885Sspwilson2@wisc.edu''' 3012885Sspwilson2@wisc.eduTest file for the util m5 exit assembly instruction. 3112885Sspwilson2@wisc.edu''' 3212885Sspwilson2@wisc.edufrom testlib import * 3312885Sspwilson2@wisc.edu 3412885Sspwilson2@wisc.edutest_progs = { 3512885Sspwilson2@wisc.edu 'x86': ('hello64-static', 'hello64-dynamic', 'hello32-static'), 3612885Sspwilson2@wisc.edu 'arm': ('hello64-static', 'hello32-static'), 3712885Sspwilson2@wisc.edu} 3812885Sspwilson2@wisc.edu 3914142Snikos.nikoleris@arm.comurlbase = 'http://gem5.org/dist/current/test-progs/hello/bin/' 4012885Sspwilson2@wisc.edufor isa in test_progs: 4112885Sspwilson2@wisc.edu for binary in test_progs[isa]: 4212885Sspwilson2@wisc.edu import os 4314142Snikos.nikoleris@arm.com url = urlbase + isa + '/linux/' + binary 4414142Snikos.nikoleris@arm.com path = joinpath(absdirpath(__file__), '..', 'test-progs', 'hello', 4514142Snikos.nikoleris@arm.com 'bin', isa, 'linux') 4614142Snikos.nikoleris@arm.com hello_program = DownloadedProgram(url, path, binary) 4712885Sspwilson2@wisc.edu 4812885Sspwilson2@wisc.edu ref_path = joinpath(getcwd(), 'ref') 4912885Sspwilson2@wisc.edu 5012885Sspwilson2@wisc.edu verifiers = ( 5112885Sspwilson2@wisc.edu verifier.MatchStdoutNoPerf(joinpath(ref_path, 'simout')), 5212885Sspwilson2@wisc.edu ) 5312885Sspwilson2@wisc.edu 5412885Sspwilson2@wisc.edu gem5_verify_config( 5512885Sspwilson2@wisc.edu name='test'+binary, 5612885Sspwilson2@wisc.edu fixtures=(hello_program,), 5712885Sspwilson2@wisc.edu verifiers=verifiers, 5812885Sspwilson2@wisc.edu config=joinpath(config.base_dir, 'configs', 'example','se.py'), 5914142Snikos.nikoleris@arm.com config_args=['--cmd', joinpath(path, binary)], 6012885Sspwilson2@wisc.edu valid_isas=(isa.upper(),), 6112885Sspwilson2@wisc.edu ) 62