- 22 9月, 2018 4 次提交
-
-
由 Cleber Rosa 提交于
The action is the same, only the condition changes, so let's use a membership test for the type of the control tag. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The function where this utility method lives is really big and complex. Let's break it down for the sake of code readability, while adding better docstrings. At the same time, this allows us to write tests for those smaller units. I've timed the performance changes caused by this, and on all trials they presented slightly better (but overall insignifcant) improvements. This is just mentioned to assert that there are no performance downsides to this change. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Caio Carrara 提交于
Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
-
由 Cleber Rosa 提交于
The changes in this commit are causing intermittent failures in our CI environment under Python 3.x. This reverts commit 55f420f7. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 20 9月, 2018 4 次提交
-
-
由 Caio Carrara 提交于
Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
-
由 Caio Carrara 提交于
Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 19 9月, 2018 6 次提交
-
-
由 Cleber Rosa 提交于
The HTMLParser class on Python 3 expects to receive text, and urlopen returns bytes. To convert bytes into text, an encoding is needed. Most providers utf-8 encoding on the responses, but Fedora's servers use ISO-8859-1: HTTP/1.1 200 OK Date: Wed, 19 Sep 2018 00:46:43 GMT Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.2k-fips ... Content-Type: text/html;charset=ISO-8859-1 ... We could get away with utf-8, but let's be thorough here. This fixes a "must be str, not bytes" error on Python 3. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Which doesn't depend on running `ps`, but is still Linux specific. In the future, it'd be nice to have a multi-platform abstraction. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
That returns the parent PID for the given process. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Caio Carrara 提交于
Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
-
由 Caio Carrara 提交于
Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
-
- 18 9月, 2018 23 次提交
-
-
由 Caio Carrara 提交于
Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Junxiang Li 提交于
Let's provide the "__str__" method for "CmdError" to be able to see the actual content on print(error). Signed-off-by: NJunxiang Li <junli@redhat.com> Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
The use of "deepcopy" should not be necessary as we only use it here to override certain keys with our values, not to modify their value. Even if (theoretically) modified those mutable values later in the code, it'd have been done even without "deepcopy" for cases where we didn't forced the "args". Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
This commit makes sure all inputs in yaml2mux plugin are decoded and passed as unicodes to variants. As a consequence this allows to actually use this plugin on python3 environment. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
The fingerprint might contain unicode characters, let's use "astring.ENCODING" to avoid EncodeErrors. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
For computers this does not really matters, but for people the use of '\n' make debugging slightly easier. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
This replaces the naive "str()" approach of turning objects into strings with proper "astring.to_text" alternative that should take care of the proper encoding and works well on py2 as well as py3. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
Explicitly close the files we are using. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
We use "iteritems()" on this object which on py2 results int "dict.iteritems", but on py3 it uses "dict.items". Because we want to modify the outcome we need to replace the "dict.items" with the slow implementation using "__getitem__" internally. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
We use the __str__ to generate fingerprint and re-ordering the set leads to different fingerprints. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Just a simple style fix and adding a missing docstring. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Instead of executing `lsmod`, the same information is available in /proc/modules. Also, add test to that function. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The same checks are performed repeated times. Let's remove those. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Since there are three possible states for a module, this fits well in the Enum type. Let's use that, and add compatibility definitions for the time being. Reference: https://trello.com/c/BMC7yFbXSigned-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
This simply moves the recent_mock() function to a common location so that it can be used by other test modules. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
I tend to favor more predictable and standard behavior, and the currently used approach to "protect" the import of Python standard libraries seems to me to be far from standard. With this change, if the system's Python interpreter is broken, or if Python standard libraries can not be imported/loaded, the default behavior will be executed. If it seems to be an Avocado problem, then we try to print a line describing that. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Caio Carrara 提交于
Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
-
由 Caio Carrara 提交于
This change updates the handle_exception function so it doesn't need to use a bare-except anymore. The code except responsible for get the crash directory was kept in a separeted function. This specific code snippet can't raise any exception. Internally it uses the avocado.utils.path.usable_rw_dir that already deals with possible exceptions. Another possible point of exception could be the import of avocado.core.data_dir module before avocado be installed itself. However this import was moved to the initial block of import and dealed proper as ImportError. This way seems all the code insisde try block keep being processed by try-except blocks without bare-except like before. Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 17 9月, 2018 1 次提交
-
-
由 Caio Carrara 提交于
Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
-
- 15 9月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
I was trying to use the external runner, in a reasonably simple way: from within a project (QEMU) build dir, I'd run: $ avocado run --external-runner=tests/qemu-iotests/check \ --external-runner-chdir=runner -- 001 002 But, what should work, did not. The problem is with the non-absolute path to the external runner, that is needed because we're changing directories. Absolute paths won't hurt otherwise (when no chdir is done), so it's always done here. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 12 9月, 2018 1 次提交
-
-
由 Praveen K Pandey 提交于
added disk utility 1- get_disk_blocksize -- this function return block size of given disk(path) 2- get_disks -- this function return all disk present in system Signed-off-by: NPraveen K Pandey <praveen@linux.vnet.ibm.com>
-