File: ci.sh

package info (click to toggle)
myhdl 0.11-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 3,728 kB
  • sloc: python: 25,033; ansic: 2,203; makefile: 243; sh: 206
file content (38 lines) | stat: -rwxr-xr-x 955 bytes parent folder | download | duplicates (2)
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
#!/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
elif [ "$CI_TARGET" == "iverilog" ]; then
  run_test make -C "myhdl/test/conversion/general" iverilog
  run_test make -C cosimulation/icarus test
  run_test make -C myhdl/test/conversion/toVerilog
  run_test make -C "myhdl/test/bugs" iverilog
elif [ "$CI_TARGET" == "ghdl" ]; then
  run_test make -C "myhdl/test/conversion/general" ghdl
  run_test make -C myhdl/test/conversion/toVHDL ghdl
  run_test make -C "myhdl/test/bugs" ghdl
fi

exit $foundError