-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into feature/v3.7.x/jetson…
…_uefi_rebased
- Loading branch information
Showing
21 changed files
with
91 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,24 @@ | ||
#!/bin/bash | ||
set -eu | ||
|
||
OTA_CLIENT_DIR="${OTACLIENT_DIR:-/ota-client}" | ||
TEST_ROOT=/test_root | ||
OTACLIENT_SRC=/otaclient_src | ||
OUTPUT_DIR="${OUTPUT_DIR:-/test_result}" | ||
CERTS_DIR="${CERTS_DIR:-/certs}" | ||
VENV="${OTA_CLIENT_DIR}/.venv" | ||
|
||
# copy the source code as source is read-only | ||
cp -R "${OTACLIENT_SRC}" "${TEST_ROOT}" | ||
|
||
# copy the certs generated in the docker image to otaclient dir | ||
echo "setup certificates for testing..." | ||
cd ${OTA_CLIENT_DIR} | ||
cd ${TEST_ROOT} | ||
mkdir -p ./certs | ||
cp -av ${CERTS_DIR}/root.pem ./certs/1.root.pem | ||
cp -av ${CERTS_DIR}/interm.pem ./certs/1.interm.pem | ||
|
||
source ${VENV}/bin/activate | ||
|
||
# setup dependencies unconditionally | ||
# NOTE: if we only do minor modified to the requirements.txt, | ||
# we don't have to rebuild the image, just call pip here | ||
APP_DEPENDENCIES="${OTA_CLIENT_DIR}/otaclient/requirements.txt" | ||
[ -f "$APP_DEPENDENCIES" ] && echo "setup app dependencies..." && \ | ||
python3 -m pip install --no-cache-dir -q -r $APP_DEPENDENCIES | ||
TESTS_DEPENDENCIES="${OTA_CLIENT_DIR}/tests/requirements.txt" | ||
[ -f "$TESTS_DEPENDENCIES" ] && echo "setup tests dependencies..." && \ | ||
python3 -m pip install --no-cache-dir -q -r $TESTS_DEPENDENCIES | ||
|
||
# exec the input params | ||
echo "execute test with coverage" | ||
cd ${OTA_CLIENT_DIR} | ||
coverage run -m pytest --junit-xml=${OUTPUT_DIR}/pytest.xml ${@:-} | ||
coverage xml -o ${OUTPUT_DIR}/coverage.xml | ||
cd ${TEST_ROOT} | ||
hatch env create dev | ||
hatch run dev:coverage run -m pytest --junit-xml=${OUTPUT_DIR}/pytest.xml ${@:-} | ||
hatch run dev:coverage xml -o ${OUTPUT_DIR}/coverage.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# generated version file by build | ||
_otaclient_version.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.