- 17 2月, 2018 3 次提交
-
-
由 Amador Pahim 提交于
Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 16 2月, 2018 9 次提交
-
-
由 Lukáš Doktor 提交于
TAP does not defines WARN(ing) test status, but allows comments. Let's simply note the test finished with some warnings which is better than nothing. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
TAP does not defines nor knows about "CANCEL" test status, it only defines "SKIP" and "TODO". Let's map the "CANCEL" test status to "SKIP" to comply with the specification. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Cleber Rosa 提交于
Which adds the namespace of the function that created the class. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Which is OK under Python 2, but not under Python 3. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
When the xunit plugin is writing to the stdout, we don't want a representation of bytes, but the bytes encoded as a string users can read. We're sticking to the 'UTF-8' encoding here because it's already hard coded here in the document (as opposed to the encoding the user may have set to its stdout). Before this patch, `avocado run /bin/false --xunit -` results in: b'<?xml version="1.0" encoding="UTF-8"?>\n<testsuite errors="0" failures="0" name="avocado" skipped="0" tests="1" time="0.018056154251098633" timestamp="2018-02-13 12:34:55.627077">\n\t<testcase classname="SimpleTest" name="1-/bin/true" time="0.018056154251098633"/>\n</testsuite>\n' After this patch it becomes: <?xml version="1.0" encoding="UTF-8"?> <testsuite errors="0" failures="0" name="avocado" skipped="0" tests="1" time="0.018121719360351562" timestamp="2018-02-13 12:34:15.669379"> <testcase classname="SimpleTest" name="1-/bin/true" time="0.018121719360351562"/> </testsuite> Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
On Python 3, it's not possible to create Elements detached from a Document. The following code fails (later than it should) on Python 3: >>> from xml.dom.minidom import Element >>> e = Element('foo') >>> e.setAttribute('bar', 'baz') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.6/xml/dom/minidom.py", line 741, in setAttribute attr.ownerDocument = self.ownerDocument AttributeError: ownerDocument Let's create elements within the document, with the `createElement` API. According to the docs "The element is not inserted into the document when it is created", so the (unchanged) code that actually puts the element in the right place still applies. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The avocado.utils.process module has been changed so that the content of stdout and stderr are now bytes. The content generated by the iso9660 backend implementations should also operate on bytes, given that it makes little sense for the library to assume a given content type of a file (inside an iso9660 archive). To make the data returned by the various backend `read()` implementations always return bytes on both Python 2 and 3, an explicit conversion is done from strings to bytes (which affects only Python 2, since Python 3 already operates with bytes on files opened in binary mode). Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
This brings a change in behaviour, in which the stdout/stderr of the executed process will now be of bytes type, instead of a string type. Two new attributes, which are implemented as properties, have been added to the CmdResult class, `stdout_text` and `stderr_text`. Those are convenience methods that will return the same content that is in `stdout` and `stderr`, reespectively, but decoded on the fly[1]. With regards to encoding, if one is not provided, the result of `sys.getdefaultencoding()` will be used ("utf-8" for Python 3 and "ascii" for Python 2). Applications and/or tests using the APIs that return a CmdResult should, to the best of my knowledge, set a default encoding themselves so a stable behavior across Python versions. But that if left to users of this API. A different tradeoff/design decision has to do with the tests modified here. One option is to have "text" (as in sequences of human readable glyphs) as being of Python type "str". On Python 2, "str" can be compared to "bytes" because a conversion will happen on demand. That is, the following is fine on Python 2: >>> result = process.run("command") >>> "expected" in process.stdout Where `expected` is of type "str" and `process.stdout` is of type "bytes". This is not true of Python 3, so either the types must match or a conversion must be done explicitly. The solutions to that are: 1) have these "text" as (of type) "bytes" in the source code itself, and avoid the conversion whenever possible 2) have "strings" in the source code itself, and use the conversion provided by `CmdResult.stdout_text` and `CmdResult.stderr_text`. The approach chosen here is to avoid conversion if possible, that is, use "byte" types, given the fact that the source code encoding is by default 'ascii' and most of the "text" dealt with here can be represented in 'ascii' too. This is equivalent of doing: result = process.run("command") b"expected" in process.stdout "errors: %s" % 0 in process.stderr_text [1] The obvious alternative, instead of decoding these on the fly would be to have multiple copies of the "same" data. This assumes that binary data produced on the stdout/stderr will usually be larger than textual data. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 15 2月, 2018 11 次提交
-
-
由 Amador Pahim 提交于
Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Amador Pahim 提交于
Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Cleber Rosa 提交于
Which makes data comparison predictable and stable across Python versions and encodings. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Before the external runner had this name, it was named "inner runner", and the sentence logged made sense like this: "Running test with the inner level test runner /bin/foobar" With the name change to "external" using "level" here doesn't sound right anymore. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
This is similar to the xunit unittest changes in 353fed04, but now applied to the functional tests which happen to use the same features. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
This is similar to the change in 418bf92a, but now applied to the functional tests that deal with xunit. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Automatically chosen on Python 3. This mimmics the (proposed) behavior in `avocado/core/runner.py`. Reference: https://github.com/avocado-framework/avocado/pull/2451Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
base64.encodestring() requires bytes on Python 3, and the whiteboard, on the other hand, requires a string. The default encodings will be used for encoding, and for encoding, we want to be safe and use ascii which can be represented in the various result formats. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
It was noticed during a review that, even though the SimpleQueue requires a context on Python 3, the multiprocessing module can choose one itself. Since I originally had no intention to force the `spawn` type of context, let's use that instead. Also, since we're using different names for a helper function and the class, one of the inspekt/pylint exceptions is not needed anymore. Kudos to Amador Pahim for suggesting that. Reference: https://github.com/avocado-framework/avocado/pull/2441#discussion_r167850053Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Amador Pahim 提交于
Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Cleber Rosa 提交于
There's a better maintained trinity test at: https://github.com/avocado-framework-tests/avocado-misc-tests/blob/master/fuzz/trinity.py Let's drop this outdated example. Reference: https://github.com/avocado-framework/avocado/issues/2285 Reference: https://trello.com/c/uCcng8dN/1168-drop-trinity-example-testSigned-off-by: NCleber Rosa <crosa@redhat.com>
-
- 14 2月, 2018 3 次提交
-
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com> * https://github.com/avocado-framework/avocado: fix avocado:utils:distro Fixed issue in avocado:utils:distro
-
由 Amador Pahim 提交于
Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Lukáš Doktor 提交于
The "--rawurl" is not supported on later "fpaste" versions as it outputs everything else to stderr. Anyway to keep compatibility with older fpaste let's explicitly use `tail -n 1` to get only the last line. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 13 2月, 2018 11 次提交
-
-
由 Praveen K Pandey 提交于
fixed pep8 issue on line no 319 Signed-off-by: NPraveen K Pandey <praveen@linux.vnet.ibm.com>
-
由 Praveen K Pandey 提交于
In SUSE distro distro.detect() is failing as undefined variable log: START 1-generic/sosreport.py:sosreport_test.test;run-cd82 Test metadata: filename: /root/avocado-fvt-wrapper/tests/avocado-misc-tests/generic/sosreport.py DATA (filename=output.expected) => NOT FOUND (data sources: variant, test, file) Reproduced traceback from: /usr/lib/python2.7/site-packages/avocado_framework-58.0-py2.7.egg/avocado/core/test.py:814 Traceback (most recent call last): File "/root/avocado-fvt-wrapper/tests/avocado-misc-tests/generic/sosreport.py", line 42, in setUp dist = distro.detect() File "/usr/lib/python2.7/site-packages/avocado_framework-58.0-py2.7.egg/avocado/utils/distro.py", line 416, in detect distro_result = probe_instance.get_distro() File "/usr/lib/python2.7/site-packages/avocado_framework-58.0-py2.7.egg/avocado/utils/distro.py", line 370, in get_distro with open(self.check_file) as check_file: AttributeError: 'SUSEProbe' object has no attribute 'check_file' Signed-off-by: NPraveen K Pandey <praveen@linux.vnet.ibm.com>
-
由 Amador Pahim 提交于
Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Lukáš Doktor 提交于
Currently almost each "Dispatcher" implements it's own "map_method", some allow to log tracebacks, some doesn't... Let's implement 2 main variants, one simple without reporting the results, the other with support for deepcopying of the arguments and returning the list of results and use them in all dispatchers. The main difference against previous version is that all dispatchers will log the traceback (to avocado.debug) and that instead of individual arguments it supports *args. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com> * https://github.com/avocado-framework/avocado: Server infrastructure: switch default URLs to HTTPS
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com> * https://github.com/avocado-framework/avocado: Test statuses: do not rely on varianter_yaml_to_mux plugin
-
由 Cleber Rosa 提交于
HTTPS has been enabled on the avocado-project.org server, so let's use it by default on docs and when downloading images from it. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
That's specific to Python 3, but works fine on Python 2. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Which includes the module name, and the different treatment of exceptions that do not inherit from BaseExcpetion. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Which gives predictable and stable results across Python versions. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 12 2月, 2018 3 次提交
-
-
由 Cleber Rosa 提交于
Avocado used to provide support for "test aliases", that is, one could call "avocado run synctest" when the file containing the test was named "synctest.py". See e65ff614 for an example. Since this "feature" has been long removed, let's remove the tests also. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Remove variable assigments that are used just once and never actually used. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
And not a directory. Tests were being always skipped becaused of that. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-