- 22 12月, 2017 1 次提交
-
-
由 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>
-
- 29 11月, 2017 1 次提交
-
-
由 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>
-
- 04 10月, 2017 2 次提交
-
-
由 Cleber Rosa 提交于
Mock is slightly lighter than MagicMock, which is only necessary when mocking "magic" methods. So, let's revert to the lighter Mock class. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
This module already uses mock, but doesn't import it in a way that is usable on Python 3. Also, let's make the style the same as in the other modules that import conditionally for Python 2 and 3. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 08 3月, 2017 1 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
Some Unixes won't have /bin/true, so let's make life easier for those other OS to run the unittests. Signed-off-by: NLucas Meneghel Rodrigues <lookkas@gmail.com>
-
- 06 2月, 2017 1 次提交
-
-
由 Cleber Rosa 提交于
The unittest standard library on Python 2.7 an later has everything that the unittest2 backport is supposed to have. Let's then drop all the conditional imports of unittest2 and stick with unittest. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 07 11月, 2016 1 次提交
-
-
由 Lukáš Doktor 提交于
Recent pylint update is more pedantic about module level spacing. There are no changes to code, only couple of extra spaces to make it happy. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 15 2月, 2016 1 次提交
-
-
由 Lukáš Doktor 提交于
This unittest patches find_command to return /usr/bin/sudo and then runs it and expects some results. This works only with correctly set sudo, but it does not work without sudo (as the binary is not found) or with incorrectly set sudo. Let's use "/bin/true" instead. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 12 2月, 2016 1 次提交
-
-
由 Lukáš Doktor 提交于
This function is useful, when one executes shell=True commands where he sets values and then executes command. He can use this function to get the actual binary path instead of the first variable=value assignment. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 27 1月, 2016 1 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
Some commands do require admin privileges to run, but we can't use the 'root' user in some testing scenarios [1]. So let's add a 'sudo' parameter to process.run(), process.system() and process.system_output() interfaces, that will append a sudo command to the original command string, causing it to be executed under sudo. The basic assumption here is that the user executing the tests was added to the sudoers file in such a way that it can run administrative commands without a password. [1] One specific environment where we can't use the root user is when avocado runs on an AWS (Amazon Web Services) instance. Signed-off-by: NLucas Meneghel Rodrigues <lookkas@gmail.com>
-
- 28 11月, 2015 2 次提交
-
-
由 Lukáš Doktor 提交于
shlex.split() can fail on some strange commands (eg. on an unfinished quotation). This patch fallbacks to simple string.split() in such cases, which might return incorrect results, but is safer to use. Although it logs warning about this notifying the user about possible issue. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Cleber Rosa 提交于
It has been reported that avocado crashes when a malformed command is attempted to be executed, even when using `shell=True`. The reason is that `shlex.split` will raise `ValueError` on those commands. Since improving `shlex.split` may be too complex, and possibly not the best place to "fix" this, let's just assume safely that this command should be run on GDB. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 03 9月, 2015 1 次提交
-
-
由 Cleber Rosa 提交于
To be honest, our test code could still be kept in the same directories and have the same names. But I think we can improve two things here: 1) Flatten a little bit the directory structure of selftests. Two path components are being dropped here: "all" and "avocado". So that "selftests/all/functional/avocado" becomes simply "selftests/functional". 2) File names match what is, by default, recognized by unittest (the Standard Library module) based discovery of tests. That means that doc_build_test.py becomes test_doc_build.py. Not a big deal IMHO. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 13 6月, 2015 1 次提交
-
-
由 Cleber Rosa 提交于
Instead of having a "common ground" that two namespaces would import and share runtime information, let's just make the plugin set the defaults for the module. This is quite appropriate, both regarding the namespace where the configurations are kept (in the avocado.utils.gdb module itself) and also regarding the single direction of module layering. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 18 3月, 2015 1 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-
- 29 1月, 2015 1 次提交
-
-
由 Cleber Rosa 提交于
Self test files used to be executable, but that changed on 143b574c. So, it doesn't make much sense to keep the shebangs + python commands on them. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 10 9月, 2014 1 次提交
-
-
由 Cleber Rosa 提交于
So that any code using our process API can be run through a debugger. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-