From 82dcba41cfaf6951eb6d75f1bd549d0a1b1ae707 Mon Sep 17 00:00:00 2001 From: Romain Pelisse Date: Thu, 27 Jun 2024 13:52:08 +0200 Subject: [PATCH] fixup --- ansible/molecule/common.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ansible/molecule/common.sh b/ansible/molecule/common.sh index 35c9566..b3381df 100755 --- a/ansible/molecule/common.sh +++ b/ansible/molecule/common.sh @@ -11,7 +11,7 @@ MOLECULE_DEBUG=${MOLECULE_DEBUG:-'--no-debug'} MOLECULE_KEEP_CACHE=${MOLECULE_KEEP_CACHE:-''} MOLECULE_CONFIG_FILE_HOME=${MOLECULE_CONFIG_FILE_HOME:-'.config/molecule/'} MOLECULE_CONFIG_FILE=${MOLECULE_CONFIG_FILE:-"${MOLECULE_CONFIG_FILE_HOME}/config.yml"} -MOLECULE_RUN_SCENARIOS_IN_PARALEL=${MOLECULE_RUN_SCENARIOS_IN_PARALEL:-''} +MOLECULE_RUN_SCENARIOS_IN_PARRALEL=${MOLECULE_RUN_SCENARIOS_IN_PARRALEL:-''} determineMoleculeVersion() { echo "$(molecule --version | head -1 | sed -e 's/using python .*$//' -e 's/^molecule *//' -e 's/ //g' | grep -e '4' | wc -l )" @@ -93,7 +93,7 @@ printScenariosThatFailed() { } configMolForParralelRuns() { - if [ -z "${MOLECULE_RUN_SCENARIOS_IN_PARALEL}" ]; then + if [ -z "${MOLECULE_RUN_SCENARIOS_IN_PARRALEL}" ]; then if [ -e "${MOLECULE_CONFIG_FILE}" ] ; then echo "Molecule configuration file already exists: ${MOLECULE_CONFIG_FILE}." echo "Skipping creation and configuration for parallel runs, it is assumed that configuration allow parralel execution of the projet scenarios." @@ -117,9 +117,9 @@ runAllMoleculeScenarios() { } listAllScenarios() { - for f in $(find molecule/*/molecule.yml -maxdepth 1 -print) + for molecule_xml in $(find molecule/*/molecule.yml -maxdepth 1 -print) do - echo $(basename $(dirname "${f}")) + echo $(basename $(dirname "${molecule_xml}")) done } @@ -131,7 +131,7 @@ runAllMoleculeScenariosInParralel() { configMolForParralelRuns for scenario_name in $(listAllScenarios) do - echo "DEBUG> molecule ${MOLECULE_DEBUG} test --parallel -s "${scenario_name}" -d "${scenario_driver_name}" -- ${extra_args}" -e wildfly_node_id=${scenario_name} ${extra_args} "${@}" &> "${scenario_name}.log &" + echo "DEBUG> molecule ${MOLECULE_DEBUG} test --parallel -s "${scenario_name}" -d "${scenario_driver_name}" -- ${extra_args}" -e wildfly_node_id=${scenario_name} ${extra_args} "${@}" '&>' "${scenario_name}.log '&'" # shellcheck disable=SC2086 molecule ${MOLECULE_DEBUG} test --parallel -s "${scenario_name}" -d "${scenario_driver_name}" -- -e wildfly_node_id=${scenario_name} ${extra_args} "${@}" &> "${scenario_name}.log" & pids["${scenario_name}"]="${!}" @@ -163,7 +163,7 @@ runMoleculeScenario() { if [ "${scenario_name}" != '--all' ]; then executeRequestedScenarios "${scenario_name}" "${scenario_driver_name}" "${extra_args}" else - if [ -z "${MOLECULE_RUN_SCENARIOS_IN_PARALEL}" ]; then + if [ -z "${MOLECULE_RUN_SCENARIOS_IN_PARRALEL}" ]; then MOLECULE_RUN_STATUS="$(runAllMoleculeScenarios '--all' "${scenario_driver_name}" ${extra_args})" else runAllMoleculeScenariosInParralel "${scenario_driver_name}" ${extra_args}