-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathregress_test.sh
executable file
·57 lines (49 loc) · 1.7 KB
/
regress_test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Run all
EMU_FILE=$1
OSCPU_ROOT=$2
RISCV_BIN_FILES=`eval "find $OSCPU_ROOT/bin/non-output/riscv-tests -name "*.bin""`
CPU_BIN_FILES=`eval "find $OSCPU_ROOT/bin/non-output/cpu-tests -name "*.bin""`
RISCV_TEST_BIN_FILES=`eval "find /SSD/sqw/prj/yay/abstract-machine/test/riscv-tests/build -name "*.bin""`
mkdir log 1>/dev/null 2>&1
for BIN_FILE in $RISCV_BIN_FILES; do
FILE_NAME=`basename ${BIN_FILE%.*}`
printf "[%30s] " $FILE_NAME
LOG_FILE=log/$FILE_NAME-log.txt
touch $LOG_FILE
$EMU_FILE -i $BIN_FILE &> $LOG_FILE
if (grep 'HIT GOOD TRAP' $LOG_FILE > /dev/null) then
echo -e "\033[1;32mPASS!\033[0m"
rm $LOG_FILE
else
echo -e "\033[1;31mFAIL!\033[0m see $BUILD_PATH/$LOG_FILE for more information"
fi
done
echo "ospcu riscv-test complete!"
for BIN_FILE in $CPU_BIN_FILES; do
FILE_NAME=`basename ${BIN_FILE%.*}`
printf "[%30s] " $FILE_NAME
LOG_FILE=log/$FILE_NAME-log.txt
touch $LOG_FILE
$EMU_FILE -i $BIN_FILE &> $LOG_FILE
if (grep 'HIT GOOD TRAP' $LOG_FILE > /dev/null) then
echo -e "\033[1;32mPASS!\033[0m"
rm $LOG_FILE
else
echo -e "\033[1;31mFAIL!\033[0m see $BUILD_PATH/$LOG_FILE for more information"
fi
done
echo "ospcu cpu_test complete!"
for BIN_FILE in $RISCV_TEST_BIN_FILES; do
FILE_NAME=`basename ${BIN_FILE%.*}`
printf "[%30s] " $FILE_NAME
LOG_FILE=log/$FILE_NAME-log.txt
touch $LOG_FILE
$EMU_FILE -i $BIN_FILE &> $LOG_FILE
if (grep 'HIT GOOD TRAP' $LOG_FILE > /dev/null) then
echo -e "\033[1;32mPASS!\033[0m"
rm $LOG_FILE
else
echo -e "\033[1;31mFAIL!\033[0m see $BUILD_PATH/$LOG_FILE for more information"
fi
done
echo "am riscv-test complete!"