- 07 5月, 2018 2 次提交
-
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com> * https://github.com/avocado-framework/avocado: python 3 : Journalctl collection failed issue
-
由 chunfuwen 提交于
json.loads(xx) on python 3 need string object out_journalctl open in text mode but bytes passed in Simply fix them by forcing to string and open in bytes mode Signed-off-by: Nchunfuwen <chwen@redhat.com>
-
- 03 5月, 2018 3 次提交
-
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
The 'avocado list -V' prints the list of tests as a matrix with Type, Test and Tag(s) columns. Some lines may get trailing whitespace chars due the method used to align the columns' value. Changed the call to avocado.utils.astring.iter_tabular_output() so that trailing whitespace are removed from each row. Adjusted the PluginsTest.test_list_no_file_loader() test due lack of whitespace on outputs to be compared. Reference: https://trello.com/c/JWeay87z/1045-strip-tabularoutput-linesSigned-off-by: NWainer dos Santos Moschetta <wainersm@redhat.com>
-
Signed-off-by: NWainer dos Santos Moschetta <wainersm@redhat.com>
-
- 02 5月, 2018 3 次提交
-
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com> * https://github.com/avocado-framework/avocado: python3: fix 'str' does not support the buffer interface
-
由 chunfuwen 提交于
Fix issue:Log file /var/log/messages collection failed: 'str' does not support the buffer interface Signed-off-by: Nchunfuwen <chwen@redhat.com>
-
Added 'strip' parameter (default False) to avocado.utils.astring's iter_tabular_output() and tabular_output() methods that strips trailing whitespace of rows on the tabular output. Also introduced unit tests for those methods. Signed-off-by: NWainer dos Santos Moschetta <wainersm@redhat.com>
-
- 28 4月, 2018 2 次提交
-
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Xiao Liang 提交于
Following the common JUnit XSD description, covert the timestamp to iso 8601. I also hit parsing fail while importing avocado xunit result to other system as timestap format. Signed-off-by: NXiao Liang <xiliang@redhat.com>
-
- 26 4月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 25 4月, 2018 5 次提交
-
-
由 Cleber Rosa 提交于
Which means it won't be executed on environments such as Travis, where resources are limited and this test fails from time to time. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Commit 33517beb has a syntax failure because reason is a mandatory argument. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
test_run_sudo() actually needs sudo, because it attempts to run it. Let's check for the file at the usual location, and skip the test unless it exists. ERROR: test_run_sudo (selftests.unit.test_utils_process.TestProcessRun) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched return func(*args, **keywargs) File "selftests/unit/test_utils_process.py", line 180, in test_run_sudo p = process.run(cmd='ls -l', sudo=True, ignore_status=True) File "avocado/utils/process.py", line 1272, in run cmd_result = sp.run(timeout=timeout) File "avocado/utils/process.py", line 781, in run self._init_subprocess() File "avocado/utils/process.py", line 571, in _init_subprocess raise details OSError: [Errno 2] No such file or directory (/bin/sudo -n ls -l) Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Depending on the Python version stack being used *by inspekt*, it can produce this error: Syntax check FAIL ************* Module avocado.utils.astring E0602:305,32: is_text: Undefined variable 'unicode' Let's disable that check, since that variable is a reserved word that should always exist in Python 2.7, for which a conditional exists. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 24 4月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 23 4月, 2018 6 次提交
-
-
由 Amador Pahim 提交于
Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Lukáš Doktor 提交于
Some of the package names were changed from "{name}" to "{version}-{name}" without changing their requirements. Let's fix it here. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
Mock complains about several files being installed, but not part of the rpm. These files are copied and generated when selftesting the Avocado. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
The "assertEquals" is set as deprecated in py3 in favor of "assertEqual". Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
Some tests execute avocado directly, which uses "/usr/bin/env python" by default. On distributions with py2 and py3 installed we might end-up running those tests using python2 while running the main selftest by python3. With this change we need to make sure to pass the correct python binary in UNITTEST_AVOCADO_CMD as it's not doing this by default (to allow any avocado command). Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 21 4月, 2018 14 次提交
-
-
由 Cleber Rosa 提交于
The FDDrainer reads from process output and write to loggers. The test log, which is intended for humans, can indeed try to treat it as text. The stream logger, on the other hand, should deal with data as binary content *only*, but this will be handled on a future change. By having text content passed to the loggers, we avoid the occurrence of log lines that look like: [stdout] b'command output' Or output files (job-YYYY-MM-DDTHH.MM-id/tests/<test>/output) that may literally contain: b'command output' The encoding used is the one specified at the command execution. With this fix, a number of tests on Python 3 can now run successfully. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
In the module global scope, "man echo" is executed to attempt to determine if it's a GNU echo. But, "man echo" in a locale such as UTF-8 produces funky copyright characters: $ LANG=en_US.UTF-8 man echo | chardetect - <stdin>: windows-1252 with confidence 0.73 Which can not be decoded by the UTF-8 codec, producing UnicodeDecodeErrors. Even if that wasn't the case, it's better to control the locale of command that can generate varied output, and that we depend on. $ LANG=C man echo | chardetect - <stdin>: ascii with confidence 1.0 Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
This change introduces the following requirement: the command to be run by the avocado.utils.process functions should be given as unicode. It brings a clearer interface, in which there's no need to deal with encodings internally. For simple test, it brings changes to respect the of passing unicode. And, it changes the presentation of simple tests with unicode names explicitly expreseed as such. The way to deal with the process data that may be generated on stdout/stderr is unchanged. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
There's just so much implicit conversion on those methods that makes them an enourmous source of errors (including UnicodeErrors). The information is still all there, and users are free to interpret them as they see fit. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
On the basis of the non-existence of the "true" command on the system running tests. Most of the tests do not even reference the "true" command, and those that do, do not require the binary to exist, but only a valid command line to be given. In that aspect, a fictional command is used where needed. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The sudo related test are currently broken in the following aspects: 1) it doesn't require TRUE_CMD 2) the monkey patching of find_command() produces and adverse effect, and makes the binary we look for ("sudo") become "true" 3) the expected results reflect the wrong sudo binary Let's fix those aspects, making sure the process.py library looks for sudo only, and that it prepends that (the found sudo binary) to the generated command. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
To lay some common ground across Python versions, let's define the criteria we have for binary or text data. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Amador Pahim 提交于
Since we are not using __dir__ anymore to list the available properties, the OrderedDict is not needed. And dropping it makes the performance to improve. Before this patch: >>> timeit.timeit('data_structures.DataSize("1M").b', setup='from avocado.utils import data_structures', number=1000000) >>> 1.1071600914001465 After this patch: >>> timeit.timeit('data_structures.DataSize("1M").b', setup='from avocado.utils import data_structures', number=1000000) >>> 0.9833340644836426 Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Amador Pahim 提交于
For small classes, like this one, with known attributes, using dict wastes a lot of RAM. Defining __slots__ as a list will save a lot of memory, while improving the performance a bit. Before this patch: >>> timeit.timeit('data_structures.DataSize("1M").b', setup='from avocado.utils import data_structures', number=1000000) >>> 1.1383171081542969 After this patch: >>> timeit.timeit('data_structures.DataSize("1M").b', setup='from avocado.utils import data_structures', number=1000000) >>> 1.1071600914001465 Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
- 20 4月, 2018 2 次提交
-
-
由 Amador Pahim 提交于
We loose in flexibility by the performance improvement justifies the change. Since __getattr__ is the last resource python tries to solve attributes, creating the actual properties makes the resolution to happen earlier and the performance to be way better. Before this patch: >>> timeit.timeit('data_structures.DataSize("1M").b', setup='from avocado.utils import data_structures', number=1000000) >>> 2.0695440769195557 After this patch: >>> timeit.timeit('data_structures.DataSize("1M").b', setup='from avocado.utils import data_structures', number=1000000) >>> 1.1383171081542969 Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Amador Pahim 提交于
Instead of using regex to parse the `data`, let's use a simpler and more performatic version witch just handles the last character to figure out the unit. Before this patch: >>> timeit.timeit('data_structures.DataSize("1M").b', setup='from avocado.utils import data_structures', number=1000000) >>> 2.988218069076538 After this patch: >>> timeit.timeit('data_structures.DataSize("1M").b', setup='from avocado.utils import data_structures', number=1000000) >>> 2.0695440769195557 Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
- 19 4月, 2018 1 次提交
-
-
由 Amador Pahim 提交于
- try harder to detect arm. - detect more archs (s390, sparc64 and i386). - fallback to plataform.machine() (instead of returning i386). Signed-off-by: NAmador Pahim <apahim@redhat.com>
-