diff options
author | Matt Clay <mclay@redhat.com> | 2020-03-01 22:57:48 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-01 22:57:48 -0800 |
commit | 64782dd815567d4a1eb8fb60987e507af753b7f7 (patch) | |
tree | 86b4eae7763c018a4b47b3bc80801a516f32cc20 | |
parent | 97d2d4512fb6686cba7ab07126658810ba0e43c2 (diff) | |
download | ansible-64782dd815567d4a1eb8fb60987e507af753b7f7.tar.gz |
Split unit tests into 3 groups. (#67917)
-rw-r--r-- | shippable.yml | 8 | ||||
-rwxr-xr-x | test/utils/shippable/units.sh | 58 |
2 files changed, 57 insertions, 9 deletions
diff --git a/shippable.yml b/shippable.yml index 33c9293fd4..5df03f2764 100644 --- a/shippable.yml +++ b/shippable.yml @@ -30,6 +30,14 @@ matrix: - env: T=units/3.8/2 - env: T=units/3.9/2 + - env: T=units/2.6/3 + - env: T=units/2.7/3 + - env: T=units/3.5/3 + - env: T=units/3.6/3 + - env: T=units/3.7/3 + - env: T=units/3.8/3 + - env: T=units/3.9/3 + - env: T=windows/2012/1 - env: T=windows/2012-R2/1 - env: T=windows/2016/1 diff --git a/test/utils/shippable/units.sh b/test/utils/shippable/units.sh index 273bd15473..e2ff963f19 100755 --- a/test/utils/shippable/units.sh +++ b/test/utils/shippable/units.sh @@ -9,22 +9,48 @@ version="${args[1]}" group="${args[2]}" if [[ "${COVERAGE:-}" == "--coverage" ]]; then - timeout=75 + timeout=90 else - timeout=20 + timeout=30 fi group1=() group2=() +group3=() -# create two groups by putting long running network tests into one group -# add or remove more network platforms as needed to balance the two groups +# create three groups by putting network tests into separate groups +# add or remove network platforms as needed to balance the groups -networks=( +networks2=( + aireos + apconos + aruba + asa + avi + check_point + cloudengine + cloudvision + cnos + cumulus + dellos10 + dellos6 + dellos9 + edgeos + edgeswitch + enos + eos + eric_eccli + exos f5 fortimanager - fortios + frr + ftd + icx + ingate ios + iosxr + ironware + itential junos netact netscaler @@ -43,7 +69,11 @@ networks=( vyos ) -for network in "${networks[@]}"; do +networks3=( + fortios +) + +for network in "${networks2[@]}"; do test_path="test/units/modules/network/${network}/" if [ -d "${test_path}" ]; then @@ -52,13 +82,23 @@ for network in "${networks[@]}"; do fi done +for network in "${networks3[@]}"; do + test_path="test/units/modules/network/${network}/" + + if [ -d "${test_path}" ]; then + group1+=(--exclude "${test_path}") + group3+=("${test_path}") + fi +done + case "${group}" in 1) options=("${group1[@]:+${group1[@]}}") ;; 2) options=("${group2[@]:+${group2[@]}}") ;; + 3) options=("${group3[@]:+${group3[@]}}") ;; esac -if [ ${#options[@]} -eq 0 ] && [ "${group}" -eq 2 ]; then - # allow collection migration unit tests for group 2 to "pass" without updating shippable.yml or this script during migration +if [ ${#options[@]} -eq 0 ] && [ "${group}" -gt 1 ]; then + # allow collection migration unit tests for groups other than 1 to "pass" without updating shippable.yml or this script during migration echo "No unit tests found for group ${group}." exit fi |