1#!/bin/bash 2 3#*************************************************************************************** 4# Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences 5# 6# XiangShan is licensed under Mulan PSL v2. 7# You can use this software according to the terms and conditions of the Mulan PSL v2. 8# You may obtain a copy of Mulan PSL v2 at: 9# http://license.coscl.org.cn/MulanPSL2 10# 11# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, 12# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, 13# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. 14# 15# See the Mulan PSL v2 for more details. 16#*************************************************************************************** 17 18TEST_HOME=$AM_HOME/tests/cputest 19 20for test in $(ls $TEST_HOME/tests) 21do 22 t=${test%.c} 23 echo -n -e "\x1b[0m $t: " 24 make -C $TEST_HOME ARCH=riscv64-noop E=0 ALL=$t run 2>/dev/null | grep -E "HIT GOOD TRAP|IPC" 25 if [[ $? != 0 ]]; 26 then 27 echo -e "\x1b[31mfail: trap code $?" 28 fi 29done 30