Skip to content

Commit 457273b

Browse files
committed
Add support for nested folders
1 parent 799b5e6 commit 457273b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

scripts/qesap/lib/cmds.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def ansible_command_sequence(configure_data_ansible, base_project, sequence, ver
289289
# the folder is not created.
290290
# Create an empty folder in advance, if it is not already there
291291
# so that the glue script called can always suppose that at least the folder is present.
292-
ansible_cmd_seq.append({'cmd': ['mkdir', junit]})
292+
ansible_cmd_seq.append({'cmd': ['mkdir', '-p', junit]})
293293

294294
ssh_share = ansible_common.copy()
295295
ssh_share[0] = ansible_bin_paths['ansible']

scripts/qesap/test/e2e/test.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -389,14 +389,16 @@ rm "${QESAPROOT}/ansible/playbooks/marasca.yaml"
389389
rm "${TEST_PROVIDER}/inventory.yaml"
390390

391391
test_step "[test_4.yaml] Run Ansible with --junit"
392+
THIS_REPORT_DIR="${QESAPROOT}/junit_reports/nested/nested"
392393
cp sambuconero.yaml "${QESAPROOT}/ansible/playbooks/sambuconero.yaml"
393394
cp inventory.yaml "${TEST_PROVIDER}/inventory.yaml"
394395
find . -type f -name "sambuconero*.xml" -delete || echo "Nothing to delete"
395-
qesap.py --verbose -b ${QESAPROOT} -c test_4.yaml ansible --junit . || test_die "test_4.yaml fail on ansible"
396+
qesap.py --verbose -b ${QESAPROOT} -c test_4.yaml ansible --junit ${THIS_REPORT_DIR} || test_die "test_4.yaml fail on ansible"
396397
junit_logs_number=$(find . -type f -name "sambuconero*.xml" | wc -l)
397398
echo "--> junit_logs_number:${junit_logs_number}"
398399
[[ $junit_logs_number -eq 1 ]] || test_die "ansible JUNIT reports should be 1 files but are ${junit_logs_number}"
399400
find . -type f -name "sambuconero*.xml" -delete
401+
rm -rf ${THIS_REPORT_DIR}
400402

401403
test_step "[test_8.yaml] Run Ansible with --profile"
402404
rm ansible.*.log.txt || echo "Nothing to delete"

0 commit comments

Comments
 (0)