-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchiseltest.sh
executable file
·57 lines (46 loc) · 983 Bytes
/
chiseltest.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
57
#! /bin/bash
# brimonzzy
chipyard=../../
pwd=$(pwd)
COLOR_RED="\033[1;31m"
COLOR_GREEN="\033[1;32m"
COLOR_NONE="\033[0m"
usage() {
echo "Usage: please see README"
echo ""
echo "Options"
echo " --help -h : Display this message"
echo " sha2 : Test sha2"
echo " sha3 : Test sha3"
exit "$1"
}
TEST_TYPE="sha3"
while [ "$1" != "" ];
do
case $1 in
-h | --help)
usage 3 ;;
sha2 | sha3)
TEST_TYPE=$1 ;;
* )
error "invalid option $1"
usage 1 ;;
esac
shift
done
if [ $TEST_TYPE == "sha3" ]; then
echo -e "$COLOR_GREEN== test sha3 ==$COLOR_NONE"
cd $chipyard
source ./env.sh
sbt "project sha3" "test"
fi
if [ $TEST_TYPE == "sha2" ]; then
echo -e "$COLOR_GREEN== test sha2 ==$COLOR_NONE"
cd $chipyard
source ./env.sh
sbt "project sha2" "test"
fi
# sbt "project sha3" "testOnly sha3.ChiTests"
# sbt "project sha3" "testOnly sha3.IotaTests"
# sbt "project sha3" "testOnly sha3.ThetaTests"