- 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 6 次提交
-
-
由 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>
-
由 Amador Pahim 提交于
Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Amador Pahim 提交于
Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Amador Pahim 提交于
Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Cleber Rosa 提交于
There are few issues (3 to my count) which affect a number of tests on Python 3. Instead of not executing any of the functional tests, let's skip the broken ones. This is important because it will prevent new issues from making its way into the Avocado code. The list of tests being skipped is being tracked on our planning board, so that they are accounted for, and enabled when fixed. Reference: https://trello.com/c/eFY9Vw1R/1282-python-3-functional-tests-checklistSigned-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
This prevents the plugin from trying to run references such as Avocado-VT tests or any other that is not backed by an executable file. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 18 4月, 2018 4 次提交
-
-
由 Amador Pahim 提交于
Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
And that have been causing failures on Travis jobs, due to limited on unreliable amount of resources present. This is the full list of tests that won't be run anymore on Travis, only on `make check-full`: selftests.functional.test_basic.RunnerOperationTest.test_early_latest_result selftests.functional.test_basic.RunnerSimpleTest.test_kill_stopped_sleep selftests.functional.test_interrupt.InterruptTest.test_well_behaved_sigint selftests.functional.test_interrupt.InterruptTest.test_well_behaved_sigterm selftests.functional.test_loader.LoaderTestFunctional.test_simple_using_main selftests.functional.test_loader.LoaderTestFunctional.test_sleep_a_lot Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 16 4月, 2018 3 次提交
-
-
由 Lukáš Doktor 提交于
Some tests might produce too much logs which might result in too big xunit results, that might be hard/impossible to publish. Let's allow setting a limit to number of characters to those files and embed only 1/2 of the limit from the beginning and 1/2 of the limit from the end of the log. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Amador Pahim 提交于
Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Abdul Haleem 提交于
Added support to pass full string of block id like 'memory234', it saves few steps of the user to find the memory blocks and call this functions to hotplug/unplug Signed-off-by: NAbdul Haleem <abdhalee@linux.vnet.ibm.com>
-
- 14 4月, 2018 3 次提交
-
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Lukáš Doktor 提交于
The fingerprint is used when replaying jobs causing "yaml_loader" test not being replayable. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 13 4月, 2018 3 次提交
-
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Abdul Haleem 提交于
Waiting 120s is not appropriate as the system takes less time for memory state to change from 'going-online' to 'online' so changed it to 10s and with freq of 0.2s Signed-off-by: NAbdul Haleem <abdhalee@linux.vnet.ibm.com>
-
- 11 4月, 2018 4 次提交
-
-
由 Cleber Rosa 提交于
When this test was initially written, the concept of a shared directory available across tests did not exist. Let's optimize the execution by avoid compilation of the same binary on every single test. 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>
-
由 Lukáš Doktor 提交于
The newly W605 warning is caused by incorrect escaped chars, that are automatically translated to '\\' but future versions should treat it as SyntaxError. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 10 4月, 2018 1 次提交
-
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com> * https://github.com/avocado-framework/avocado: example/tets/gdbtest.py: do not require trailing newlines avocado/utils/external/gdbmi_parser.py: "type" parameter left behind
-