forked from myhdl/myhdl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci.sh
executable file
·36 lines (31 loc) · 893 Bytes
/
ci.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
#!/bin/bash
ANSI_RED=`tput setaf 1`
ANSI_GREEN=`tput setaf 2`
ANSI_CYAN=`tput setaf 6`
ANSI_RESET=`tput sgr0`
run_test() {
echo -e "\n${ANSI_CYAN}running test: $@ ${ANSI_RESET}"
"$@"
if [ $? -ne 0 ]; then
echo "${ANSI_RED}[FAILED] $@ ${ANSI_RESET}"
foundError=1
else
echo "${ANSI_GREEN}[PASSED] $@ ${ANSI_RESET}"
fi
echo
}
foundError=0
echo -e "Running $CI_TARGET tests\n"
CI_TARGET=${CI_TARGET:-core}
if [ "$CI_TARGET" == "core" ]; then
run_test make -C myhdl/test/core
run_test make -C myhdl/test/core2
elif [ "$CI_TARGET" == "icarus" ]; then
run_test make -C "myhdl/test/conversion/general" icarus
run_test make -C cosimulation/icarus
run_test make -C myhdl/test/conversion/toVerilog
elif [ "$CI_TARGET" == "ghdl" ]; then
run_test make -C "myhdl/test/conversion/general" GHDL
run_test make -C myhdl/test/conversion/toVHDL GHDL
fi
exit $foundError