1
0
mirror of https://github.com/myhdl/myhdl.git synced 2024-12-14 07:44:38 +08:00
myhdl/ci.sh

37 lines
898 B
Bash
Raw Normal View History

2015-02-25 20:30:24 -08:00
#!/bin/bash
2015-03-11 01:55:02 -04:00
ANSI_RED=`tput setaf 1`
ANSI_GREEN=`tput setaf 2`
ANSI_CYAN=`tput setaf 6`
ANSI_RESET=`tput sgr0`
run_test() {
2015-03-11 01:55:02 -04:00
echo -e "\n${ANSI_CYAN}running test: $@ ${ANSI_RESET}"
"$@"
if [ $? -ne 0 ]; then
2015-03-11 01:55:02 -04:00
echo "${ANSI_RED}[FAILED] $@ ${ANSI_RESET}"
foundError=1
else
2015-03-11 01:55:02 -04:00
echo "${ANSI_GREEN}[PASSED] $@ ${ANSI_RESET}"
fi
2015-03-11 01:55:02 -04:00
echo
}
foundError=0
2015-03-11 01:55:02 -04:00
echo -e "Running $CI_TARGET tests\n"
2015-02-25 20:30:24 -08:00
CI_TARGET=${CI_TARGET:-core}
2015-02-25 20:30:24 -08:00
if [ "$CI_TARGET" == "core" ]; then
run_test make -C myhdl/test/core
run_test make -C myhdl/test/core2
2015-02-25 20:30:24 -08:00
elif [ "$CI_TARGET" == "icarus" ]; then
run_test make -C "myhdl/test/conversion/general" icarus
run_test make -C cosimulation/icarus test
run_test make -C myhdl/test/conversion/toVerilog
2015-03-03 18:19:29 -05:00
elif [ "$CI_TARGET" == "ghdl" ]; then
run_test make -C "myhdl/test/conversion/general" GHDL
run_test make -C myhdl/test/conversion/toVHDL GHDL
2015-02-25 20:30:24 -08:00
fi
exit $foundError