Debian Codegraph @

ansible_collections/community/docker/tests/utils/shippable/units.sh

raw
1 #!/usr/bin/env bash
2 # Copyright (c) Ansible Project
3 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
4 # SPDX-License-Identifier: GPL-3.0-or-later
5
6 set -o pipefail -eux
7
8 declare -a args
9 IFS='/:' read -ra args <<< "$1"
10
11 group="${args[1]}"
12
13 if [[ "${COVERAGE:-}" == "--coverage" ]]; then
14 timeout=90
15 else
16 timeout=30
17 fi
18
19 group1=()
20
21 case "${group}" in
22 1) options=("${group1[@]:+${group1[@]}}") ;;
23 esac
24
25 ansible-test env --timeout "${timeout}" --color -v
26
27 # shellcheck disable=SC2086
28 ansible-test units --color -v --docker default ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \
29 "${options[@]:+${options[@]}}" \