Azure CI: Save pytest output automatically
PATCH 1/2 Azure CI: Save pytest output automatically
Enable use of the python-azurepipelines package which provides automatic formatting and uploading of the pytest output.
--- .azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
.azure-pipelines.yml +2 -1
@@ -194,10 +194,11 @@ stages: virtualenv -p /usr/bin/python3 /tmp/venv . /tmp/venv/bin/activate pip install -r test/py/requirements.txt + pip install pytest-azurepipelines export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH}; export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci; # "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not - ./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID} ${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"} --build-dir "$UBOOT_TRAVIS_BUILD_DIR"; + ./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID} ${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"} --build-dir "$UBOOT_TRAVIS_BUILD_DIR" --report-dir "$UBOOT_TRAVIS_BUILD_DIR"; # the below corresponds to .gitlab-ci.yml "after_script" rm -rf /tmp/uboot-test-hooks /tmp/venv EOF
Signature · 1 line
2.34.1
PATCH 2/2 Azure CI: Be explicit about pytest cache directory
The default pytest cache directory is in a read-only directory in Azure, which results in a warning on the build page. Use the pytest command line option to set the cache dir to somewhere writable.
--- .azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
.azure-pipelines.yml +1 -1
@@ -198,7 +198,7 @@ stages: export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH}; export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci; # "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not - ./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID} ${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"} --build-dir "$UBOOT_TRAVIS_BUILD_DIR" --report-dir "$UBOOT_TRAVIS_BUILD_DIR"; + ./test/py/test.py -ra -o cache_dir="$UBOOT_TRAVIS_BUILD_DIR"/.pytest_cache --bd ${TEST_PY_BD} ${TEST_PY_ID} ${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"} --build-dir "$UBOOT_TRAVIS_BUILD_DIR" --report-dir "$UBOOT_TRAVIS_BUILD_DIR"; # the below corresponds to .gitlab-ci.yml "after_script" rm -rf /tmp/uboot-test-hooks /tmp/venv EOF
Signature · 1 line
2.34.1
Re: [PATCH 2/2] Azure CI: Be explicit about pytest cache directory
Quoted 9 lines · Tom Rini
The default pytest cache directory is in a read-only directory in Azure, which results in a warning on the build page. Use the pytest command line option to set the cache dir to somewhere writable.
Signed-off-by Tom Rini <[email protected]>--- .azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Re: [PATCH 2/2] Azure CI: Be explicit about pytest cache directory
In reply to Tom RiniQuoted 6 lines · Tom Rini
The default pytest cache directory is in a read-only directory in Azure, which results in a warning on the build page. Use the pytest command line option to set the cache dir to somewhere writable.
Signed-off-by Tom Rini <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
Quoted 8 lines · Tom Rini
Enable use of the python-azurepipelines package which provides automatic formatting and uploading of the pytest output.
Signed-off-by Tom Rini <[email protected]>--- .azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 21 lines
.azure-pipelines.yml +2
-2@@ -194,10 +194,11 @@ stages: virtualenv -p /usr/bin/python3 /tmp/venv . /tmp/venv/bin/activate pip install -r test/py/requirements.txt + pip install pytest-azurepipelines export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH}; export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci; # "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not - ./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID} ${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"} --build-dir "$UBOOT_TRAVIS_BUILD_DIR"; + ./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID} ${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"} --build-dir "$UBOOT_TRAVIS_BUILD_DIR" --report-dir "$UBOOT_TRAVIS_BUILD_DIR"; # the below corresponds to .gitlab-ci.yml "after_script" rm -rf /tmp/uboot-test-hooks /tmp/venv EOF --2.34.1
Quoted 5 lines · Tom Rini
Enable use of the python-azurepipelines package which provides automatic formatting and uploading of the pytest output.
Signed-off-by Tom Rini <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom