#!/usr/bin/env bash
set -e
bazel test //firmware/emu/trajectory_manager/config:cas_static_config_kitt_proto_test
bazel test //firmware/emu/trajectory_manager/config:cas_static_config_kitt_proto_test_validator_test
bazel test //firmware/emu/trajectory_manager/config:cas_static_config_vh6_proto_test
bazel test //firmware/emu/trajectory_manager/config:cas_static_config_vh6_proto_test_validator_test

# Unset PYTHONPATH variable so that Ach server can be launched via py2and3_library
[ ! -z "$PYTHONPATH" ] && unset PYTHONPATH

ZOOX_ROBOT_NAME=kitt_01 \
ZOOX_VEHICLE_CONFIG=/etc/zoox/calibration/param/kitt_01.json \
bazel run //vehicle/ai_monitor/trajectory_manager:ai_trajectory_manager_launch
ZOOX_ROBOT_NAME=vh6b_001 \
ZOOX_VEHICLE_CONFIG=/etc/zoox/calibration/param/vh6b_001.json \
bazel run //vehicle/ai_monitor/trajectory_manager:ai_trajectory_manager_launch
