Skip to content

Commit

Permalink
op.sh: run pytest (#33090)
Browse files Browse the repository at this point in the history
test
  • Loading branch information
maxime-desroches authored Jul 26, 2024
1 parent e68bb26 commit a1dce6e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tools/op.sh
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,15 @@ function op_lint() {
)
}
function op_test() {
(set -e
op_before_cmd
op_run_command pytest $@
)
}
function op_replay() {
(set -e
Expand Down Expand Up @@ -308,6 +317,7 @@ function op_default() {
echo -e " ${BOLD}replay${NC} Run replay"
echo -e " ${BOLD}cabana${NC} Run cabana"
echo -e " ${BOLD}lint${NC} Run all the pre-commit checks"
echo -e " ${BOLD}test${NC} Run all unit tests from pytest"
echo -e " ${BOLD}help${NC} Show this message"
echo -e " ${BOLD}install${NC} Install the 'op' tool system wide"
echo ""
Expand Down Expand Up @@ -353,6 +363,7 @@ function _op() {
juggle ) shift 1; op_juggle "$@" ;;
cabana ) shift 1; op_cabana "$@" ;;
lint ) shift 1; op_lint "$@" ;;
test ) shift 1; op_test "$@" ;;
replay ) shift 1; op_replay "$@" ;;
sim ) shift 1; op_sim "$@" ;;
install ) shift 1; op_install "$@" ;;
Expand Down Expand Up @@ -384,6 +395,7 @@ unset -f op_before_cmd
unset -f op_sim
unset -f op_activate_venv
unset -f op_get_openpilot_dir
unset -f op_test
unset DRY
unset NC
unset RED
Expand Down

0 comments on commit a1dce6e

Please sign in to comment.