- 08 3月, 2018 2 次提交
-
-
由 Cleber Rosa 提交于
On Python 3, the calculation of a value for a unit will return a float. Let's make things predictable accross Python 2 and 3 and force an integer instead. Reference: https://github.com/avocado-framework/avocado/pull/2498Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Amador Pahim 提交于
Now that we have a second use case for it, let's finally create the DataSize object. Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
- 26 2月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
In situations where a user of the CmdResult class manually sets the stdout/stderr attributes to a string, instead of the recommended and documented content of type "bytes", it won't be possible to "decode" the bytes into a string of a given encoding, and we'll end up with a crash. Since the goal of std{out,err}_text is to return a text version of stdout, if itself already is of such a type, let's just return it. Additionally, if the data cannot be "decode()d", let's raise an explicit TypeError on this location, rather than later in the code when its value is attempted to be used. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 23 2月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
Looks like the Python 3 module import code behaves differently than Python 2 with regards to where it looks modules by name: File "/home/cleber/src/avocado/avocado/avocado/core/test.py", line 932, in _run_avocado raise test_exception File "/home/cleber/src/avocado/avocado/avocado/core/test.py", line 819, in _run_avocado testMethod() File "/home/cleber/src/avocado/avocado/avocado/core/test.py", line 1371, in test self.error(self.exception) File "/home/cleber/src/avocado/avocado/avocado/core/test.py", line 1041, in error raise exceptions.TestError(message)\navocado.core.exceptions.TestError: Traceback (most recent call last): File "/usr/lib64/python3.6/imp.py", line 297, in find_module raise ImportError(_ERR_MSG.format(name), name=name) ImportError: No module named \'whiteboard\'\n\n' Effectively, this means when running this test, on Python 3, on the parallel mode, the change of directory implemented there (on selftests/checkall) will make Python 3 fail to find this module, and the test will fail. This makes the reference to the module path absolute, so no matter where this test is run from, it should be able to find the module. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 16 2月, 2018 1 次提交
-
-
由 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>
-
- 15 2月, 2018 1 次提交
-
-
由 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>
-
- 12 2月, 2018 2 次提交
-
-
由 Cleber Rosa 提交于
And not a directory. Tests were being always skipped becaused of that. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The directory check is being performed, but without value to the test. Let's turn it into an assertion. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 04 2月, 2018 1 次提交
-
-
由 Amador Pahim 提交于
Whiteboard was (probably accidentally) removed from the test attributes. This patch recreates the whiteboard. Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
- 20 1月, 2018 1 次提交
-
-
由 Lukáš Doktor 提交于
In case on of the first cleanups fails the following ones are not performed, leaving uncleaned files. Lets perform always all steps and then check for occurred errors. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 19 1月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
The prevailing coding style of Avocado (unittest.TestCase) tests is to use the specialized assert methods, such as assertNotRegexpMatches. Unfortunately, the regular expression related assertion methods have been through a messy renaming. In theory, assertNotRegexpMatches and assertRegexpMatches should be available in Python 3.0 and 3.1, but not in Python >= 3.2, where it got renamed to assertRegex and assertNotRegex. In practice, in my system with Python 3.6.3, I see: >>> unittest.TestCase.assertNotRegexpMatches <function TestCase._deprecate.<locals>.deprecated_func at 0x7f3b85b709d8> But in Travis, with Python 3.4, it's not available: ERROR: test_directives_regex (selftests.unit.test_safeloader.DocstringDirectives) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/avocado-framework/avocado/selftests/unit/test_safeloader.py", line 135, in test_directives_regex self.assertNotRegexpMatches(directive, safeloader.DOCSTRING_DIRECTIVE_RE) AttributeError: 'DocstringDirectives' object has no attribute 'assertNotRegexpMatches' Let's simplify things and just use a regex match and check for its result. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 04 1月, 2018 3 次提交
-
-
由 Amador Pahim 提交于
make spell is now covering more cases. This patch fixes the actual spell errors and adds the required exceptions. Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Cleber Rosa 提交于
The docstring given on `_greedy_path()` has examples that don't match the implementation. To prevent the implementation from deviating (again?) let's turn those into tests. Also, to make the purpose of that function more clear, this changes its name to `_greedy_path_to_re()`. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The order in which test classes and methods are found is relevant to the loader result. Currently, this ordering is not dependable as the loader findings are stored on a regular dictionary. This change makes the ordering dependable, and so happens to also make the test pass on a Python 3 environment. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 24 12月, 2017 1 次提交
-
-
由 Cleber Rosa 提交于
Which, different than standard Python xml.etree library, can do schema validation. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 22 12月, 2017 3 次提交
-
-
由 Cleber Rosa 提交于
That's the only sane way to handle data, as bytes. Let's not assume any enconding on them. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Move tests to the plugin's own directory. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Move tests to the plugin's own directory. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 21 12月, 2017 2 次提交
-
-
由 Cleber Rosa 提交于
And drop the notion of a "multiplex capable" Avocado. If the plugin is installed, then we assume the dependencies have been fulfilled. The plugin presence is used then for the creation of the test suite, including the plugin's own tests. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
This drops the notion of a "multiplex capable" Avocado. If the plugin is installed, then we assume the dependencies have been fulfilled. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 20 12月, 2017 1 次提交
-
-
由 Cleber Rosa 提交于
Some versions of the unittest mock library cannot easily deal with (builtin) open(). Let's skip these tests on those platforms, instead of coming up with cumbersome code to support them on all (ancient) versions. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 16 12月, 2017 2 次提交
-
-
由 Cleber Rosa 提交于
This simple test, after the s390x version, checks the proper parsing of and x86_64 /proc/cpuinfo. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Dan Zheng 提交于
The output in /proc/cpuinfo is different between s390x and other archs. This is to support to parse the output on s390x. Signed-off-by: NDan Zheng <dzheng@redhat.com> Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 15 12月, 2017 1 次提交
-
-
由 Cleber Rosa 提交于
The `avocado.core.tree.TreeNode` is the foundation of the current Parameter System (`avocado.core.parameters.AvocadoParams`), but it lacks unittests that only deal with itself. Some tests that exercise the Multiplexer version of the `TreeNodes` (`MuxTreeNodes`) exist, but again, that's not what the core Parameter System is based on. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 14 12月, 2017 2 次提交
-
-
由 Cleber Rosa 提交于
The AvocadoParams, as a database of test parameters, has no need to know information about the test. In fact, the test id parameter has never had any real use so far. Let's remove it. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
A lot of the core Avocado code still refers to "mux" based terminology. For instance, what was previously "mux_path" is now "parameter paths", and what was previously "mux" is now really variants. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 06 12月, 2017 1 次提交
-
-
由 Cleber Rosa 提交于
This is an attempt to catch most (if not all) usages of open that do not follow the context manager pattern. Sometimes, for better readability, our own `genio` library is used. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 01 12月, 2017 3 次提交
-
-
由 Lukáš Doktor 提交于
Despite the reviews we have some W0102s that potentially corrupts the arguments. Let's get rid of them. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Cleber Rosa 提交于
The default parameters mechanism proved to be confusing, overlapping and thus was scheduled to be removed. This implements the removal of the default_params API. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Our goal to completely separate the basic parameter interface and the varianter pass through here: splitting these modules into their reespective ones. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 30 11月, 2017 2 次提交
-
-
由 Cleber Rosa 提交于
The `_reference_check()` utility method now provides more meaningful results. This allows one to check wether a check was actually performed. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The code is basically the same for all different files. Let's have a single method instead. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 29 11月, 2017 3 次提交
-
-
由 Cleber Rosa 提交于
There was once an idea that the "mux" would be an interface that would be reused by other implementations (say, json_to_mux, foo_to_mux, etc). Now, it seems much more important to make the Avocado varianter design and interfaces better, and advocate its use instead. Additionally, there has always been a gray line between the Multiplexer and the Avocado params. Moving the mux outside of the Avocado core will help to draw clearer lines. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
And include jobdata results and a test for 52.0 (LTS). The 52.0 release, an LTS release, was meant to allow transitions from the previous LTS version (36.0lts) and it did so including the ability to replay jobs created with the older version. Now, we're 6+ months into the 52.0 release, and as promised, we'll stop maintaining 36.0lts. To keep to code clean, let's remove all this compatibility with versions before 52.0. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The FDDrainer reads from the PIPEs and writes to both the internal StringIO instances and to stream logging handlers. There are no guarantees that the logging handlers will flush the content before the FDDrainer finishes. Let's explicitly close all the handlers (which should really be FileHandlers) associated with the stream loggers, which should flush and sync the content on the files themselves. Additionally, the combined drainer was being missed from the flush process, and was causing some output in that mode to be unavailable on generated output. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 18 11月, 2017 2 次提交
-
-
由 Cleber Rosa 提交于
This is refactor of the current locks/file/threads created in the SubProcess class to a more contained an isolated (and tested) block of functionality. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
And raise an exception early if an invalid value is given. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 16 10月, 2017 1 次提交
-
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 14 10月, 2017 1 次提交
-
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 13 10月, 2017 1 次提交
-
-
由 Cleber Rosa 提交于
Instead of the iterator next method. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-