You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2021/06/20 09:08:14 UTC
[airflow] branch main updated: Improve hints for reproducing tests
(#16545)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 9e49693 Improve hints for reproducing tests (#16545)
9e49693 is described below
commit 9e49693ea5ecdbe83f8f111e91e9633d6ba2ed3b
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Sun Jun 20 11:07:57 2021 +0200
Improve hints for reproducing tests (#16545)
The hints to reproducible run of test are improved:
* colors added
* they are much shorter and only most useful option is shown
---
.../ci_run_single_airflow_test_in_docker.sh | 43 ++++------------------
1 file changed, 7 insertions(+), 36 deletions(-)
diff --git a/scripts/ci/testing/ci_run_single_airflow_test_in_docker.sh b/scripts/ci/testing/ci_run_single_airflow_test_in_docker.sh
index 45bbb9b..1f69ef6 100755
--- a/scripts/ci/testing/ci_run_single_airflow_test_in_docker.sh
+++ b/scripts/ci/testing/ci_run_single_airflow_test_in_docker.sh
@@ -156,42 +156,13 @@ function run_airflow_testing_in_docker() {
echo "${COLOR_RED}* See the above log for details.${COLOR_RESET}"
echo "${COLOR_RED}*${COLOR_RESET}"
echo "${COLOR_RED}***********************************************************************************************${COLOR_RESET}"
- echo """
-* You can easily reproduce the failed tests on your dev machine/
-*
-* When you have the source branch checked out locally:
-*
-* Run all tests:
-*
-* ./breeze --backend ${BACKEND} ${EXTRA_ARGS}--python ${PYTHON_MAJOR_MINOR_VERSION} --db-reset --skip-mounting-local-sources --test-type ${TEST_TYPE} tests
-*
-* Enter docker shell:
-*
-* ./breeze --backend ${BACKEND} ${EXTRA_ARGS}--python ${PYTHON_MAJOR_MINOR_VERSION} --db-reset --skip-mounting-local-sources --test-type ${TEST_TYPE} shell
-*"""
- if [[ -n "${GITHUB_REGISTRY_PULL_IMAGE_TAG=}" ]]; then
- echo """
-* When you do not have sources:
-*
-* Run all tests:
-*
-* ./breeze --github-image-id ${GITHUB_REGISTRY_PULL_IMAGE_TAG} --backend ${BACKEND} ${EXTRA_ARGS}--python ${PYTHON_MAJOR_MINOR_VERSION} --db-reset --skip-mounting-local-sources --test-type ${TEST_TYPE} tests
-*
-* Enter docker shell:
-*
-* ./breeze --github-image-id ${GITHUB_REGISTRY_PULL_IMAGE_TAG} --backend ${BACKEND} ${EXTRA_ARGS}--python ${PYTHON_MAJOR_MINOR_VERSION} --db-reset --skip-mounting-local-sources --test-type ${TEST_TYPE} shell
-*"""
- fi
- echo """
-*
-* NOTE! Once you are in the docker shell, you can run failed test with:
-*
-* pytest [TEST_NAME]
-*
-* You can copy the test name from the output above
-*
-***********************************************************************************************"""
-
+ echo
+ echo "${COLOR_BLUE}***********************************************************************************************${COLOR_RESET}"
+ echo "${COLOR_BLUE}Reproduce the failed tests on your local machine:${COLOR_RESET}"
+ echo "${COLOR_YELLOW}./breeze --github-image-id ${GITHUB_REGISTRY_PULL_IMAGE_TAG=} --backend ${BACKEND} ${EXTRA_ARGS}--python ${PYTHON_MAJOR_MINOR_VERSION} --db-reset --skip-mounting-local-sources --test-type ${TEST_TYPE} shell${COLOR_RESET}"
+ echo "${COLOR_BLUE}Then you can run failed tests with:${COLOR_RESET}"
+ echo "${COLOR_YELLOW}pytest [TEST_NAME]${COLOR_RESET}"
+ echo "${COLOR_BLUE}***********************************************************************************************${COLOR_RESET}"
fi
echo ${exit_code} > "${PARALLEL_JOB_STATUS}"