Signed-off-by: Andrei Stepanov astepano@redhat.com
@psss this is fix for the issue you commented at :
https://pagure.io/standard-test-roles/pull-request/335#comment-84571
@bgoncalv @psss it would be nice if you can test it. This took a while for me to rewrite, because of double escaping.
Waiting for ACK.
pretty please pagure-ci rebuild
Is not possible to add this test playbook to STR tests?
Is not possible to add this test playbook to STR tests? Good idea.
The fix doesn't work when playbook uses also source role.
I think it is because the work dir changed from /var/str/source to /root/\\/var\\/str\\/source
/var/str/source
/root/\\/var\\/str\\/source
example: of tests that fail: https://src.fedoraproject.org/rpms/cockpit/blob/master/f/tests/tests.yml
Not related to this PR, but I really dislike seeing the main log empty and then having to open the error log to see what went wrong.
# cat artifacts/FAIL_str_smoke.log Run test 'smoke': done. Test's exit code: 127 # cat artifacts/smoke-err.log bash: ./smoke: No such file or directory smoke (problem with test execution)
@bgoncalv let's back to the current PR. Is this PR OK? Will you open a new bug for "source role"?
I didn't change this.
Not related to this PR, but I really dislike seeing the main log empty and then having to open the error log to see what went wrong. -- this is personal preference. I gave strong explanation why we do this. Please stop comment this, this comment is unrelated to this PR. :(
@bgoncalv you mentioned this doesn't work for https://src.osci.redhat.com/rpms/pyparted/blob/rhel-8.1.0/f/tests/tests.yml
With current STR (without modifications to basic) I got:
TASK [standard-test-source : Pull down the source tarballs] *************************************************************************************************************************************************** fatal: [localhost -> 127.0.0.1]: FAILED! => {"changed": false, "msg": "Unable to retrieve source file: pyparted-3.11.0.tar.gz", "original_sources": "/root/pyparted/tests/../sources", "sources": []} to retry, use: --limit @/root/pyparted/tests/tests.retry PLAY RECAP **************************************************************************************************************************************************************************************************** localhost : ok=5 changed=2 unreachable=0 failed=1
Note the output of pwd is different when the patch is applied.
pwd
reproducer:
--- - hosts: localhost roles: - role: standard-test-basic tags: - classic tests: - test: dir: ./ run: pwd
without the patch
# cat artifacts/PASS_str_test.log /var/str Run test 'test': done. Test's exit code: 0 PASS test
with the patch
# cat artifacts/PASS_str_test.log /root/\/var\/str\ Run test 'test': done. Test's exit code: 0 PASS test
Also note the playbook above creates a test case named test. This causes the main test.log to not be created. This is not a bug caused by the patch, but a regression caused by recent basic role update.
test
test.log
I did a few tests and it seems to be working as expected. Although I find the way of implementation with manual special characters escaping a bit fragile. Solution using environment variables proposed in #327 seems to me as a more reliable way. But let's go forward with this patch now I don't think we should invest more time into this.
# rpm -qa | grep standard-test-roles standard-test-roles-inventory-qemu-3.2-1.fc29.57c878f.1.noarch standard-test-roles-3.2-1.fc29.57c878f.1.noarch
@psss Does this work for you?
cd ~/ curl -k -O https://jenkins-continuous-infra.apps.ci.centos.org/view/Fedora%20All%20Packages%20Pipeline/job/fedora-rawhide-image-test/lastSuccessfulBuild/artifact/Fedora-Rawhide.qcow2 git clone https://src.fedoraproject.org/rpms/cockpit.git cd cockpit/tests rm -rf artifacts; ANSIBLE_INVENTORY=$(test -e inventory && echo inventory || echo /usr/share/ansible/inventory) TEST_SUBJECTS=~/Fedora-Rawhide.qcow2 ansible-playbook --tags=classic tests.yml
No, it does not work. It seems that the source is not prepared a thus the test fails. But this does not seem to be related to this change. Perhaps some other recent changes in the standard-test-source role?
standard-test-source
It is related to this patch, some how work dir got changed.
work dir
see: https://pagure.io/standard-test-roles/pull-request/337#comment-85243
https://pagure.io/standard-test-roles/pull-request/337#comment-85251
rebased onto 2a3534de847b7408e71681d11d5215b04d19b72e
@bgoncalv fixed work dir Please test.
rebased onto 12225f811a82852e6aff861b64babe65b67591c9
thanks, it works for me.
rebased onto 1acebff98b732b9771b965f38268b8ac7df0a710
@psss @bgoncalv thanks for helping fixing, and spotting issues.
Commit 7d22d563 fixes this pull-request
Pull-Request has been merged by astepano
Signed-off-by: Andrei Stepanov astepano@redhat.com