Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/ci/testing/run_breeze_command_with_retries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ for i in $(seq 1 "$NUMBER_OF_ATTEMPT") ; do
breeze down
set +e
if breeze "$@"; then
set -e
exit 0
else
echo
Expand Down
38 changes: 34 additions & 4 deletions scripts/ci/testing/run_unit_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,68 +31,98 @@ TEST_SCOPE=${2}

function core_tests() {
echo "${COLOR_BLUE}Running core tests${COLOR_RESET}"
set +e
if [[ "${TEST_SCOPE}" == "DB" ]]; then
set -x
breeze testing core-tests --run-in-parallel --run-db-tests-only
RESULT=$?
set +x
elif [[ "${TEST_SCOPE}" == "Non-DB" ]]; then
set -x
breeze testing core-tests --use-xdist --skip-db-tests --no-db-cleanup --backend none
RESULT=$?
set +x
elif [[ "${TEST_SCOPE}" == "All" ]]; then
set -x
breeze testing core-tests --run-in-parallel
RESULT=$?
set +x
elif [[ "${TEST_SCOPE}" == "Quarantined" ]]; then
set -x
breeze testing core-tests --test-type "All-Quarantined"
breeze testing core-tests --test-type "All-Quarantined" || true
RESULT=$?
set +x
elif [[ "${TEST_SCOPE}" == "ARM collection" ]]; then
set -x
breeze testing core-tests --collect-only --remove-arm-packages --test-type "All"
RESULT=$?
set +x
elif [[ "${TEST_SCOPE}" == "System" ]]; then
set -x
breeze testing system-tests tests/system/example_empty.py
RESULT=$?
set +x
else
echo "Unknown test scope: ${TEST_SCOPE}"
set -e
exit 1
fi
echo "${COLOR_BLUE}Core tests completed${COLOR_RESET}"
set -e
if [[ ${RESULT} != "0" ]]; then
echo
echo "${COLOR_RED}The ${TEST_GROUP} test ${TEST_SCOPE} failed! Giving up${COLOR_RESET}"
echo
exit "${RESULT}"
fi
echo "${COLOR_GREEN}Core tests completed successfully${COLOR_RESET}"
}

function providers_tests() {
echo "${COLOR_BLUE}Running providers tests${COLOR_RESET}"
set +e
if [[ "${TEST_SCOPE}" == "DB" ]]; then
set -x
breeze testing providers-tests --run-in-parallel --run-db-tests-only
RESULT=$?
set +x
elif [[ "${TEST_SCOPE}" == "Non-DB" ]]; then
set -x
breeze testing providers-tests --use-xdist --skip-db-tests --no-db-cleanup --backend none
RESULT=$?
set +x
elif [[ "${TEST_SCOPE}" == "All" ]]; then
set -x
breeze testing providers-tests --run-in-parallel
RESULT=$?
set +x
elif [[ "${TEST_SCOPE}" == "Quarantined" ]]; then
set -x
breeze testing providers-tests --test-type "All-Quarantined"
breeze testing providers-tests --test-type "All-Quarantined" || true
RESULT=$?
set +x
elif [[ "${TEST_SCOPE}" == "ARM collection" ]]; then
set -x
breeze testing providers-tests --collect-only --remove-arm-packages --test-type "All"
RESULT=$?
set +x
elif [[ "${TEST_SCOPE}" == "System" ]]; then
set -x
breeze testing system-tests providers/tests/system/example_empty.py
RESULT=$?
set +x
else
echo "Unknown test scope: ${TEST_SCOPE}"
set -e
exit 1
fi
echo "${COLOR_BLUE}Providers tests completed${COLOR_RESET}"
set -e
if [[ ${RESULT} != "0" ]]; then
echo
echo "${COLOR_RED}The ${TEST_GROUP} test ${TEST_SCOPE} failed! Giving up${COLOR_RESET}"
echo
exit "${RESULT}"
fi
echo "${COLOR_GREEB}Providers tests completed successfully${COLOR_RESET}"
}


Expand Down