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 2020/11/14 08:19:08 UTC
[airflow] branch v1-10-test updated: fixup! Split tests to more
sub-types (#11402)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v1-10-test by this push:
new 9c0086d fixup! Split tests to more sub-types (#11402)
9c0086d is described below
commit 9c0086dbcadb3787482485e7425c39d4cfffac8e
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Sat Nov 14 09:17:42 2020 +0100
fixup! Split tests to more sub-types (#11402)
---
.github/workflows/ci.yml | 2 +-
scripts/in_container/entrypoint_ci.sh | 59 +++--------------------------------
2 files changed, 6 insertions(+), 55 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 73bb45d..8c7df5c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -43,7 +43,7 @@ env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REGISTRY_PULL_IMAGE_TAG: "${{ github.run_id }}"
GITHUB_REGISTRY_PUSH_IMAGE_TAG: "latest"
- TEST_TYPES: '["Core", "Providers", "API", "CLI", "Integration", "Other", "WWW", "Heisentests"]'
+ TEST_TYPES: '["Core", "Integration", "Heisentests"]'
# You can switch between building the image in "Build Images" workflow or building them in CI workflow
# Separately for each job.
diff --git a/scripts/in_container/entrypoint_ci.sh b/scripts/in_container/entrypoint_ci.sh
index 02ecab2..772abdb 100755
--- a/scripts/in_container/entrypoint_ci.sh
+++ b/scripts/in_container/entrypoint_ci.sh
@@ -219,66 +219,18 @@ else
)
fi
-declare -a SELECTED_TESTS CLI_TESTS API_TESTS PROVIDERS_TESTS CORE_TESTS WWW_TESTS \
- ALL_TESTS ALL_PRESELECTED_TESTS ALL_OTHER_TESTS
-
-# Finds all directories that are not on the list of tests
-# - so that we do not skip any in the future if new directories are added
-function find_all_other_tests() {
- local all_tests_dirs
- all_tests_dirs=$(find "tests" -type d)
- all_tests_dirs=$(echo "${all_tests_dirs}" | sed "/tests$/d" )
- all_tests_dirs=$(echo "${all_tests_dirs}" | sed "/tests\/dags/d" )
- local path
- for path in "${ALL_PRESELECTED_TESTS[@]}"
- do
- escaped_path="${path//\//\\\/}"
- all_tests_dirs=$(echo "${all_tests_dirs}" | sed "/${escaped_path}/d" )
- done
- for path in ${all_tests_dirs}
- do
- ALL_OTHER_TESTS+=("${path}")
- done
-}
+declare -a SELECTED_TESTS CORE_TESTS ALL_TESTS
if [[ ${#@} -gt 0 && -n "$1" ]]; then
SELECTED_TESTS=("${@}")
else
- CLI_TESTS=("tests/cli")
- API_TESTS=("tests/api" "tests/api_connexion")
- PROVIDERS_TESTS=("tests/providers")
CORE_TESTS=(
- "tests/core"
- "tests/executors"
- "tests/jobs"
- "tests/models"
- "tests/serialization"
- "tests/ti_deps"
- "tests/utils"
- )
- WWW_TESTS=("tests/www")
- ALL_TESTS=("tests")
- ALL_PRESELECTED_TESTS=(
- "${CLI_TESTS[@]}"
- "${API_TESTS[@]}"
- "${PROVIDERS_TESTS[@]}"
- "${CORE_TESTS[@]}"
- "${WWW_TESTS[@]}"
+ "tests"
)
+ ALL_TESTS=("${CORE_TESTS[@]}")
- if [[ ${TEST_TYPE:=""} == "CLI" ]]; then
- SELECTED_TESTS=("${CLI_TESTS[@]}")
- elif [[ ${TEST_TYPE:=""} == "API" ]]; then
- SELECTED_TESTS=("${API_TESTS[@]}")
- elif [[ ${TEST_TYPE:=""} == "Providers" ]]; then
- SELECTED_TESTS=("${PROVIDERS_TESTS[@]}")
- elif [[ ${TEST_TYPE:=""} == "Core" ]]; then
+ if [[ ${TEST_TYPE:=""} == "Core" ]]; then
SELECTED_TESTS=("${CORE_TESTS[@]}")
- elif [[ ${TEST_TYPE:=""} == "WWW" ]]; then
- SELECTED_TESTS=("${WWW_TESTS[@]}")
- elif [[ ${TEST_TYPE:=""} == "Other" ]]; then
- find_all_other_tests
- SELECTED_TESTS=("${ALL_OTHER_TESTS[@]}")
elif [[ ${TEST_TYPE:=""} == "All" || ${TEST_TYPE} == "Quarantined" || \
${TEST_TYPE} == "Postgres" || ${TEST_TYPE} == "MySQL" || \
${TEST_TYPE} == "Heisentests" || ${TEST_TYPE} == "Long" || \
@@ -292,8 +244,7 @@ else
fi
fi
-readonly SELECTED_TESTS CLI_TESTS API_TESTS PROVIDERS_TESTS CORE_TESTS WWW_TESTS \
- ALL_TESTS ALL_PRESELECTED_TESTS
+readonly SELECTED_TESTS CORE_TESTS ALL_TESTS
if [[ -n ${RUN_INTEGRATION_TESTS=} ]]; then
# Integration tests