Closed coolbrg closed 6 years ago
Avocado is nice to do comparison checks, like assert on values to be equal, etc. but besides that, it does not really offer much more for me...
@amitkrout @agajdosi Your thoughts as well.
AFAIK whatever the outupt we get is piped to log file created by avocado. As part of test script is concerned avocado has better advantage over shell script, even we can leverage its uses in future. Not sure how replacing with shell script resolves the problem. IMO rather replacing this with shell script we should take this to avocado repo
If time is now the constraint then will take shell script as a solution and will create a new issue to track the avocado problem. WDYT ?
@amitkrout , my main concern is following
avocado based tests - https://ci.centos.org/job/minishift-centos-iso-pr/221/console (Unable to see logs of minishift operations)
Shell based tests - https://ci.centos.org/job/minishift-centos-iso-pr/225/console
I see.. @budhrg We have a option to call the shell script through avocado. Something like this way
avocado run --show-job-log tests/test.sh
Would you pleas try this one
@amitkrout , we are using that form only
https://github.com/minishift/minishift-centos-iso/blob/master/centos_ci.sh#L47
https://github.com/minishift/minishift-centos-iso/blob/master/Makefile#L90
@budhrg i think you did not get me what i am trying to say. Let me put in this way
Just call the shell script through avocado run as i mentioned above avocado run --show-job-log tests/test.sh
, not like this sh tests/test.sh
. So that we can atleast know the error coming from the test.py script or from avocado itself.
@amitkrout , not working as avocado framework assumes tests are written in Python language.
Error from job when I made above change
09:21:28 Done.
09:21:28 avocado run --show-job-log tests/test.sh
09:21:28 found extension EntryPoint.parse('journal = avocado.plugins.journal:JournalResult')
09:21:28 found extension EntryPoint.parse('tap = avocado.plugins.tap:TAPResult')
09:21:28 found extension EntryPoint.parse('human = avocado.plugins.human:Human')
09:21:28 found extension EntryPoint.parse('teststmpdir = avocado.plugins.teststmpdir:TestsTmpDir')
09:21:28 found extension EntryPoint.parse('jobscripts = avocado.plugins.jobscripts:JobScripts')
09:21:28 found extension EntryPoint.parse('human = avocado.plugins.human:HumanJob')
09:21:28
09:21:28 Unable to resolve reference(s) 'tests/test.sh' with plugins(s) 'file', 'external', try running 'avocado list -V tests/test.sh' to see the details.
09:21:29 make: *** [test] Error 2
$ avocado list -V tests/test.sh
Type Test Tag(s)
NOT_A_TEST tests/test.sh: Does not look like an INSTRUMENTED test, nor is it executable
TEST TYPES SUMMARY
==================
ACCESS_DENIED: 0
BROKEN_SYMLINK: 0
EXTERNAL: 0
INSTRUMENTED: 0
MISSING: 0
NOT_A_TEST: 1
SIMPLE: 0
@budhrg You can use --external-runner
flag, it will be then --external-runner /bin/bash
if I remember correctly.
Agree with @gbraad . Also now that we have integration test in Minishift which takes care of lots of system testing (black box) I am not inclined towards Avocado.
After going through the debugging of #121 , I am feeling that avocado based Python tests are good for reporting purpose however it is not able to properly display the logs. For example I enabled
--show-libmachine-logs
to see logs but this buildI wrote a temporary shell script to see logs in this build which seems to give expected logs where one can easily see what's wrong going on.
Also, shell based test feel natural .
Any thoughts @gbraad @praveenkumar @LalatenduMohanty ?