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