112887Sjason@lowepower.com# Copyright (c) 2018 The Regents of the University of California. 212887Sjason@lowepower.com# All rights reserved. 312887Sjason@lowepower.com# 412887Sjason@lowepower.com# Redistribution and use in source and binary forms, with or without 512887Sjason@lowepower.com# modification, are permitted provided that the following conditions are 612887Sjason@lowepower.com# met: redistributions of source code must retain the above copyright 712887Sjason@lowepower.com# notice, this list of conditions and the following disclaimer; 812887Sjason@lowepower.com# redistributions in binary form must reproduce the above copyright 912887Sjason@lowepower.com# notice, this list of conditions and the following disclaimer in the 1012887Sjason@lowepower.com# documentation and/or other materials provided with the distribution; 1112887Sjason@lowepower.com# neither the name of the copyright holders nor the names of its 1212887Sjason@lowepower.com# contributors may be used to endorse or promote products derived from 1312887Sjason@lowepower.com# this software without specific prior written permission. 1412887Sjason@lowepower.com# 1512887Sjason@lowepower.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1612887Sjason@lowepower.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1712887Sjason@lowepower.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1812887Sjason@lowepower.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1912887Sjason@lowepower.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2012887Sjason@lowepower.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2112887Sjason@lowepower.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2212887Sjason@lowepower.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2312887Sjason@lowepower.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2412887Sjason@lowepower.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2512887Sjason@lowepower.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2612887Sjason@lowepower.com# 2712887Sjason@lowepower.com# Authors: Sean Wilson 2812887Sjason@lowepower.com 2912887Sjason@lowepower.com''' 3012887Sjason@lowepower.comTest file for simply building gem5 3112887Sjason@lowepower.com''' 3212887Sjason@lowepower.comimport re 3312887Sjason@lowepower.comimport os 3412887Sjason@lowepower.comfrom testlib import * 3512887Sjason@lowepower.com 3612887Sjason@lowepower.comcommon_isas = [constants.x86_tag, constants.arm_tag, constants.riscv_tag] 3712887Sjason@lowepower.com 3812887Sjason@lowepower.comfor isa in constants.supported_isas: 3912887Sjason@lowepower.com if isa is constants.null_tag: continue 4012887Sjason@lowepower.com 4112887Sjason@lowepower.com for variant in constants.supported_variants: 4212887Sjason@lowepower.com if isa in common_isas: 4312887Sjason@lowepower.com length = constants.quick_tag 4412887Sjason@lowepower.com else: 4512887Sjason@lowepower.com length = constants.long_tag 4612887Sjason@lowepower.com 4712887Sjason@lowepower.com tags = [isa, length, variant] 4812887Sjason@lowepower.com 4912887Sjason@lowepower.com name = 'build-{isa}-{var}'.format(isa=isa, var=variant) 5012887Sjason@lowepower.com fixture = Gem5Fixture(isa, variant) 5112887Sjason@lowepower.com 5212887Sjason@lowepower.com function = TestFunction(lambda fixtures: True, name, 5312887Sjason@lowepower.com fixtures=[fixture]) 5412887Sjason@lowepower.com TestSuite(name=name, tests=[function], tags=tags) 55