- 30 8月, 2018 1 次提交
-
-
由 Caio Carrara 提交于
This pylint check makes sure the log message is not built in log statement itself, but uses the proper argument from logger to do it lazy. Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
-
- 29 8月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
First of all, a disclaimer: this is hackish. But, it's the simplest and thus best fix I could think of. What happens here is that this module makes no distintcion between what is a base class "abstract" class, and a concrete class. With the goal of reducing code duplication, a goal that will remain valid here and in other modules, it made sense to create a common Fedora class. Now, because only being a ImageProviderBase suffices, the FedoraImageProviderBase class, which is not intended to be used as a concrete (final) class, is being carried along and its "name" is checked, causing crashes. This introduces the ad-hoc, hackish, notion, that a concrete ImageProvider is one that contains a name. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 28 8月, 2018 2 次提交
-
-
由 Cleber Rosa 提交于
To decode into the correct encoding and work properly across different Python versions. While at it, improve the docstring. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
To the relevant code block that can, for a reason we expect, raise such exception. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 27 8月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
If the AVOCADO variable starts with the Python interpreter, the command that will be logged by Avocado needs to be adjusted. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 25 8月, 2018 1 次提交
-
-
由 Caio Carrara 提交于
The testIdentity changed here was using assertTrue with a constant instead of a conditional. So, to make lint pass it was updated to a more appropriate assert. Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
-
- 24 8月, 2018 3 次提交
-
-
由 Caio Carrara 提交于
This change enables checks for use of global statement (W0603). There are some specific points using global currently. However, since refactor these places is not simple enough, they was allower specifically. This way we can isolate them and stop using global in other future implementations. Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
-
由 Cleber Rosa 提交于
Based on the discussion, it makes sense to have individual tests for bad and good requests, and also one that shares the state among bad and good requests. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Caio Carrara 提交于
This change enables loads of pylint checks that do not require big code changes. Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
-
- 23 8月, 2018 3 次提交
-
-
由 Cleber Rosa 提交于
This addition to the utilities library facilitates the use of the cloudinit features inside Linux OSs images for the cloud. For now, it eases the creation of "cidata" ISOs, containing configuration to cloud-init, and also a simple "phone home" server. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Caio Carrara 提交于
This change introduce AVOCADO_PARALLEL_LINT variable to selftest/checkall script to make possible set the parallel lint execution per environment. Since currently the Travis CI is failing due lint parallel execution, this change already sets AVOCADO_PARALLEL_LINT to 1 in Travis CI. Reference: https://trello.com/c/LQ0szonHSigned-off-by: NCaio Carrara <ccarrara@redhat.com>
-
由 Cleber Rosa 提交于
lsof is not an Avocado dependency, and is much harder to find on base systems than mount, kill, etc. Since this module pretty much revolves around those utilities this does not propose major changes, trying to adapt to the lack of mount, kill, etc. This change makes it clear, through a PartitionError, when it's not possible to run a forceful unmount due to the lack (or error) of lsof. While at it, it refactors the methods that returns the list of PIDs using lsof. To be completely honest, there is still a broken expectation here: one cannot assume that by sending a signal the process will be killed. But, at least it is signalled by another PartitionError exception. https://trello.com/c/DDUNPCBxSigned-off-by: NCleber Rosa <crosa@redhat.com>
-
- 22 8月, 2018 3 次提交
-
-
由 Cleber Rosa 提交于
There's a lot of common steps among the tests, and most of the partition tests (there's only one exception so far) assume a filesystem and mounted partition. Let's consolidate the code into common classes and reuse that code. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Using the builtin assertIsNone() method. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Caio Carrara 提交于
This change enables W0150 (lost-exception) and W1645 (Exception.message removed in Python 3) related to exception heandling. This change also enables other checks that didn't require code changes W0122, W0123, W0124, W0125. Reference: https://trello.com/c/Ohh7Q6qjSigned-off-by: NCaio Carrara <ccarrara@redhat.com>
-
- 21 8月, 2018 4 次提交
-
-
由 Cleber Rosa 提交于
This method allows the creation of files inside a newly created ISO file. For now, the API is kept as simple as possible, and as such, there are limitations involving creating directories (and files in other directories than the root dir), mode for files, etc. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
This method allows the creation of brand new ISO files, written to disk at close() time. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
So that users of the `iso9660` utility function can choose a backend that matches specific requirements. This is intended to be used to add create/write features to some backends, that will allow the creation of ISO files, without mandating all backends to be implement those. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Caio Carrara 提交于
The tests was done mocking the real output of `/proc/buddyinfo`. To make it easier the process to get the buddy info content was extracted for a specific function that actually only wraps the open call. This way we can mock this function return only instead of try mock the builtin open function. Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
-
- 17 8月, 2018 1 次提交
-
-
由 Caio Carrara 提交于
Reference: https://trello.com/c/Ohh7Q6qjSigned-off-by: NCaio Carrara <ccarrara@redhat.com>
-
- 16 8月, 2018 1 次提交
-
-
由 Caio Carrara 提交于
Reference: https://trello.com/c/Ohh7Q6qjSigned-off-by: NCaio Carrara <ccarrara@redhat.com>
-
- 14 8月, 2018 2 次提交
-
-
由 Cleber Rosa 提交于
This check is based on a number of packages that are either Python 2 only and/or are not available on most distros. And, pylint itself supports this type of check. Reference: https://trello.com/c/rfSAXdyiSigned-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Unfortunately, the vmimage module doesn't have any unittests, so the compatibility with Python 3 has not been tested. Let's fix the obvious compatiblity issues and add the most simple test possible to at least load the utility module on Python 3. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 13 8月, 2018 1 次提交
-
-
由 Caio Carrara 提交于
E1111 error happens when a function which doesn't return is used to assign to something. In this particular case the unittest.TextTestResut stopTest method doesn't return and its result is being assigned to a variable. This behaviour makes pylint fails with E1111 error. This commit just don't assign the result of super() call and also keeps the super class method behavior (not returing). Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
-
- 12 8月, 2018 1 次提交
-
-
由 Caio Carrara 提交于
Python 3.7 introduced a new way to add breakpoint on the code. It was added the built-in breackpoint function. There was couple of places where the word breakpoint was being redefined making pylint execution fail with W0622 error (Redefining built-in). This commit replaces 'breakpoint' with 'break_point' in these places. Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
-
- 09 8月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
While abusing the term tests, this is an initial set of files that are intended to test how Avocado can be deployed on various platforms, using different installation methods. At this point, a single combination of installation method (pip) and destination (virtual environment). Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 04 8月, 2018 1 次提交
-
-
由 Lukáš Doktor 提交于
Currently we compare the full TreeNodeEnvironment object to make sure they come from the same origin, which only works for connected tree. But Avocado supports (and uses in json-load) passing leaves of unconnected trees, but then the TreeNodeEnvironments are not matching. Let's rely only on "TreeNodeEnvironment.path" and declare these matching environments, no matter what values are stored (see selftest for details) Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 03 8月, 2018 4 次提交
-
-
由 Cleber Rosa 提交于
Instead of repeating those definitions on most test files, let's define them once, and reuse them across tests. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
When AVOCADO is set by the environment variable, it may or may not contain a Python interpreter. In any situation, Avocado itself won't know about it, and will log the avocado test runner script in its logs. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Instead of trying locations on Python 2 and 3. The same pattern is used on other locations. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Instead of creating new temporary dirs and files, and handling their removal in each test, let's just create additional dirs/files in the already provided tmpdir, which will be removed by the test tearDown method. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 01 8月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
This implements another backend for the avocado.utils.iso9660 library, based on the pure Python pycdlib. The library, as it's the case with all other ISO9660 utilities, is optional and should only attempted to be be used if they are available in the system. In theory, we're well equipped with backends, but this brings the interesting possibility of running on non-UNIX platforms. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 27 7月, 2018 1 次提交
-
-
由 Lukáš Doktor 提交于
Difference between aarch32/64 is fairly simple, let's detect it ourselves instead of relying on "machine.platform". Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 25 7月, 2018 3 次提交
-
-
由 Lukáš Doktor 提交于
Avoid IndexError in case of empty archive. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
Recently the archive library started returning first file name, let's adjust our selftests to make sure it works. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Cleber Rosa 提交于
Implementation of the CIT varianter optional plugin. Signed-off-by: NAmador Pahim <amador@apahim.org> Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 21 7月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
`examples/tests/simplewarning.sh` calls a generic avocado command, which gets added to the path by the test code. That generic avocado command is `scripts/avocado`, from the source repository, which contains the unversioned `/usr/bin/env python`. Under some environments, such as Fedora >= 29, there may be no unversioned Python binary. Let's respect the UNITTEST_AVOCADO_CMD environment variable, and add the the directory containting that binary to the PATH. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 19 7月, 2018 3 次提交
-
-
由 Merlin Mathesius 提交于
Signed-off-by: NMerlin Mathesius <mmathesi@redhat.com>
-
由 Merlin Mathesius 提交于
Signed-off-by: NMerlin Mathesius <mmathesi@redhat.com>
-
由 Cleber Rosa 提交于
Given that the implementation of the code to find Avocado Instrumented Tests is already quite big, and that a good part of it already lives in the safeloader module, let's complete the move. This sets the tone of having the generic loader mechanism in the "avocado.core.loader" module, while having implementations, at least for the instrumented test at this point, in the "avocado.core.safeloader" module. With this change, the loader knows nothing about ast, and relies on safeloader.find_avocado_tests() only. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-