[CI] split molecule testes to run in parallel (#8756)

* add parametrization to molecule_run.sh

* [CI] split molecule tests to allow parallelization of work
This commit is contained in:
Cristian Calin
2022-04-29 10:09:12 +03:00
committed by GitHub
parent b7004d72c5
commit 835fd86a08
4 changed files with 118 additions and 25 deletions

View File

@@ -1,10 +1,32 @@
#!/bin/bash
set -euxo pipefail
set -euxo pipefail -o noglob
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
for d in $(find roles -name molecule -type d)
_PATH='roles'
_EXCLUDE=""
while [[ $# -gt 0 ]] ; do
case $1 in
-e|--exclude)
_EXCLUDE="${_EXCLUDE} -not -path ${_PATH}/$2/*"
shift
shift
;;
-i|--include)
_PATH="${_PATH}/$2"
shift
shift
;;
-h|--help)
echo "Usage: molecule_run.sh [-h|--help] [-e|--exclude] [-i|--include]"
exit 0
;;
esac
done
for d in $(find ${_PATH} ${_EXCLUDE} -name molecule -type d)
do
pushd $(dirname $d)
molecule test --all