Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
Integration test refactoring
Browse files Browse the repository at this point in the history
- Added script for updating upstream kuksa proto files: `/tools/update-kuksa-proto.sh`
- Removed "gen_proto" dummy package in integration tests (pytest needs custom path to work now)
- Added Actuator target value support in `VDBHelper`
- Added test for Actuator target set usecase in `test_val_seat.py`
- Fixed `test_feeder.py` to use VSS4.0 compliant datapoints
- Updated Tesla DBC from upstream, added DogMode signal
- Updated `dbc2val` mapping (DogMode is optional as it will be missing in databroker by default)
- Updated `feedercan` version to 0.4.1
- Fixed `it-config` for new `dbc2val` properties
- Updated vscode scripts for feedercan, integration test, kukca client
- Reduced devcontainer image layer size to allow push in ttl.sh

Signed-off-by: Ivan Kirchev <Ivan.Kirchev@bosch.com>
  • Loading branch information
int0x27 committed Nov 7, 2023
1 parent 86802f9 commit 80ebc71
Show file tree
Hide file tree
Showing 63 changed files with 24,759 additions and 2,808 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
# ********************************************************************************/

# Download base image of Ubuntu
FROM kuksa.val.services/ci:latest
# NOTE: it may be required to build the image locally (check root README.md)
FROM oci_kuksa-val-services-ci:latest

# If you get proxy errors, make sure Docker is configured correctly.
# Hint: https://dev.to/zyfa/setup-the-proxy-for-dockerfile-building--4jc8
Expand Down
31 changes: 24 additions & 7 deletions .vscode/scripts/run-feedercan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,20 @@ if [ ! -f "$FEEDERCAN_EXEC_PATH/dbcfeeder.py" ]; then
fi

cd "$FEEDERCAN_EXEC_PATH" || exit 1
pip3 install -q -r requirements.txt

if [ -z "$(which python3.9)" ]; then
echo "### WARNING! dbc2val requires python3.9" 1>&2
echo "You may install 3.9 in pyenv. Check: https://github.com/pyenv/pyenv#installation"
echo "$ curl https://pyenv.run | bash"
echo "$ pyenv install 3.9.18"
echo "$ pyenv versions"
echo "$ pyenv global 3.9.18"
echo "$ python3.9 --version"
fi

# PIP_OPT="--upgrade --retries 1 --timeout 3"
### IMPORTANT: dbc2val now requires python 9, does not work on python8
pip3.9 install $PIP_OPT -q -r requirements.txt -r requirements-dev.txt

####################################
### feedercan environment setup ####
Expand All @@ -65,14 +78,18 @@ CONFIG_DIR="$ROOT_DIRECTORY/integration_test/volumes/dbc2val"

### Override default files for feedercan to be consistent with tests
export DBC_FILE="$CONFIG_DIR/it-can.dbc"
export MAPPING_FILE="$CONFIG_DIR/it-mapping.yml"
export MAPPING_FILE="$CONFIG_DIR/it-vss_4.0.json"
# uncomment if you need to test with DogMode datapoints (requires custom vss config for databroker)
#export MAPPING_FILE="$CONFIG_DIR/it-vss_4.0-dogmode.json"
export CANDUMP_FILE="$CONFIG_DIR/it-candump0.log"
export USECASE="databroker"

# export USECASE="databroker"
export USE_DBC2VAL=1
export NO_USE_VAL2DBC=1

export LOG_LEVEL="info" #,dbcfeeder=debug"
## Uncomment to enable most of the debug modules
# export LOG_LEVEL="info,databroker=debug,dbcfeeder.broker_client=debug,dbcfeeder=debug,dbcreader=debug"
## Uncomment for verbose dbcreader decoded can dumps, needs dbcreader=debug
# export CAN_VERBOSE=1
#export LOG_LEVEL="debug,dbcfeeder=debug,kuksa_client.grpc=debug,dbcfeederlib.canplayer=debug,dbcfeederlib.canreader=debug,dbcfeederlib.dbc2vssmapper=debug"

echo
echo "*******************************************"
Expand All @@ -95,4 +112,4 @@ dapr run \
--components-path "$ROOT_DIRECTORY/.dapr/components" \
--config "$ROOT_DIRECTORY/.dapr/config.yaml" &
#--
python3 -u ./dbcfeeder.py
python3.9 -u ./dbcfeeder.py
4 changes: 2 additions & 2 deletions .vscode/scripts/run-integrationtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ else
echo
fi

pip3 install -q -U -r "${ROOT_DIRECTORY}/integration_test/requirements-dev.txt"
pip3 install -q -U -r "${ROOT_DIRECTORY}/integration_test/requirements.txt"
pip3 install -q -r "${ROOT_DIRECTORY}/integration_test/requirements-dev.txt"
pip3 install -q -r "${ROOT_DIRECTORY}/integration_test/requirements.txt"
pip3 install -q -e "${ROOT_DIRECTORY}/integration_test/"
pip3 install -q -e "${ROOT_DIRECTORY}/hvac_service/"

Expand Down
2 changes: 1 addition & 1 deletion .vscode/scripts/run-kuksa-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ if [ "$STANDALONE" = "1" ]; then
# prevent warning dumps
GRPC_ENABLE_FORK_SUPPORT=true kuksa-client --ip 127.0.0.1 --port "$DATABROKER_PORT" --protocol grpc --insecure
else
docker run -it --rm -e GRPC_ENABLE_FORK_SUPPORT=true --net=host "ghcr.io/eclipse/kuksa.val/kuksa-client:$KUKSACLIENT_VERSION" --ip 127.0.0.1 --port "$DATABROKER_PORT" --protocol grpc --insecure
docker run -it --rm -e GRPC_ENABLE_FORK_SUPPORT=true --net=host "ghcr.io/eclipse/kuksa.val/kuksa-client:$KUKSACLIENT_VERSION" # get--ip 127.0.0.1 --port "$DATABROKER_PORT" --protocol grpc #--insecure
fi
342 changes: 56 additions & 286 deletions hvac_service/kuksa/val/v1/types_pb2.py

Large diffs are not rendered by default.

150 changes: 30 additions & 120 deletions hvac_service/kuksa/val/v1/val_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 80ebc71

Please sign in to comment.