- 16 2月, 2019 1 次提交
-
-
由 Cleber Rosa 提交于
Each test has its own log file within a given job result dir, located at "test-results/$(test-id)/debug.log". If the test is an INSTRUMENTED test, using the standard Python logging module/API, all produced content should be recorded into the test log file. This adds a handler that does exactly that to the logging module root logger. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 05 2月, 2019 1 次提交
-
-
由 Lukáš Doktor 提交于
Recently we fixed bug where timeouts were not kept under certain conditions, but the fix lacked selftests modification of those 2 affected selftests as they rely on test-postprocess timing. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 29 1月, 2019 1 次提交
-
-
由 Cleber Rosa 提交于
Based on some reports of failures to behave properly on unittest.TestCase's assertRaises methods, let's improve the test coverage on these situations. References: https://github.com/avocado-framework/avocado/issues/2791Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 10 12月, 2018 1 次提交
-
-
由 Caio Carrara 提交于
Since the pystache project seems to be dead, without recent updates and has not support planned for Python 3.7+, this change replace it by jinja template engine. Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
-
- 07 12月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
In an effort to make jobs more self contained, and given that dry-run jobs created temporary content that is not supposed to be kept after the job is run, this introduces the following changes: * Jobs with "dry-run" enabled will now, by default, cleanup their own data. Basically, this means that the "base log directory" created during job initialization, and that for non "dry-run" jobs is usually "~/avocado/job-results", will also be removed at the job's "cleanup()" phase. * A new "--dry-run-no-cleanup" command line option, that only makes sense when jobs with dry-run enabled start to clean up data for themselves * Because some result plugins will, by default, write to the job results directory, results plugins are now run before a job cleanup is done. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 06 12月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
There are at least two places in which the same functionality is present. Let's make it a single utility function instead. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 14 11月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
The correct name of the exception is TestAbortError, and not TestAbortedError. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 02 10月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
Currently, the only way to pass parameters to Avocado is by using the variants layer, that is, one of the existing varianter plugin implementations. This was based on earlier design decisions, that we're trying to fix without breaking expectation and compatibility. While it'd makes sense to support parameters created by the varianter layer itself, together with non-varianter parameters, it seems that we can start by adding support for one or the other being used at a time. This commit does exactly that: add support for a method of passing parameters via the command line for all tests in a job, without having to resort to the varianter. When the varianter is used, it takes precedence and the core test parameter passing support is ignored. This should solve a number of use cases that require one-time executions of tests with different parameters, especially executions during test development and debugging. Signed-off-by: NCleber Rosa <crosa@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>
-
- 01 9月, 2018 1 次提交
-
-
由 Caio Carrara 提交于
The W0613 check for unnused arguments. The most of the current cases seems legitmate so the proper flag was added in each line so pylint can ignore it. Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
-
- 03 8月, 2018 1 次提交
-
-
由 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>
-
- 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 1 次提交
-
-
由 Merlin Mathesius 提交于
Signed-off-by: NMerlin Mathesius <mmathesi@redhat.com>
-
- 03 5月, 2018 1 次提交
-
-
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>
-
- 01 5月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
It's not easy to find one definitive specification for the the JUnit / Xunit formats, and a number of different schemas have been published by different entities. The current schema version we ship was based on a repository that is no longer available. Even though the format is exactly the same, let's switch to the schema hosted by the JUnit project, and to what is considered the Jenkins schema (as part of the JUnit 5 project). Reference: https://junit.org/junit5/ Reference: https://raw.githubusercontent.com/junit-team/junit5/master/platform-tests/src/test/resources/jenkins-junit.xsdSigned-off-by: NCleber Rosa <crosa@redhat.com>
-
- 25 4月, 2018 1 次提交
-
-
由 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>
-
- 23 4月, 2018 2 次提交
-
-
由 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 3 次提交
-
-
由 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>
-
- 19 4月, 2018 1 次提交
-
-
由 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>
-
- 18 4月, 2018 1 次提交
-
-
由 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>
-
- 11 4月, 2018 1 次提交
-
-
由 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>
-
- 28 3月, 2018 3 次提交
-
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
The skip_location is suppose to use "skip_location" and not "warn_location". Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
The built-in regexp requires re.MULTILINE to work the same way as before (allowing the match to be everywhere and not just in the first line). As for the existing ones I believe users would benefit from allowing MULTILINE as well, but there might be slight change in behavior. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 22 3月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
These warnings are described as: W0612: Used when a variable is defined but not used. W0622: Used when a variable or function override a built-in. After a suggestion from Andrei Stepanov, we decided to immediately enable these. Rerefence: https://pagure.io/standard-test-roles/pull-request/144 Reference: https://trello.com/c/Ohh7Q6qj/1183-enable-w-in-travis-make-checkSigned-off-by: NCleber Rosa <crosa@redhat.com>
-
- 20 3月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
The latest jobs have been failing because of the following issues: ************* Module raise E1130: 48,30: Raise.test: bad operand type for unary -: NoneType ************* Module selftests.functional.test_basic I1101:1191,24: PluginsXunitTest.run_and_check: Module 'lxml.etree' has not 'XMLSchema' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. I1101:1191,40: PluginsXunitTest.run_and_check: Module 'lxml.etree' has not 'parse' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. I1101:1193,43: PluginsXunitTest.run_and_check: Module 'lxml.etree' has not 'parse' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. ************* Module selftests.unit.test_xunit I1101: 91,24: xUnitSucceedTest.test_add_success: Module 'lxml.etree' has not 'XMLSchema' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. I1101: 91,40: xUnitSucceedTest.test_add_success: Module 'lxml.etree' has not 'parse' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. I1101: 92,43: xUnitSucceedTest.test_add_success: Module 'lxml.etree' has not 'parse' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. We can't whitelist the `lxml.etree` module at this time (inspekt doesn't have such an option) and the raise failure is a false positive. Let's ignore those issues then. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 15 3月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
Under Python 3.4, which runs on our CI and is our lowest supported version, json.loads() requires a string, while newer versions also allows bytes. >>> json.loads(b'{}') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/cleber/.local/lib/python3.4/json/__init__.py", line 312, in loads s.__class__.__name__)) TypeError: the JSON object must be str, not 'bytes' Let's make that code compatible with Python 3.4. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 23 2月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
The pystache library on Python 3 will generated an HTML file with entity references for the single quote char, instead of the literal char. Let's check for either one of them in the functional test test_basic.RunnerSimpleTest.test_fs_unfriendly_run(). Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 22 2月, 2018 5 次提交
-
-
由 Cleber Rosa 提交于
The config file generated and used on this test was missing a separator between the section name and the first key/value line. This adds a new line and makes the resulting file aesthetically pleasing and able to be parsed. 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 提交于
The "url" and "test" fields are just legacy and duplicated fields that carry the same data as the "id" field. Let's remove those. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 16 2月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
This brings a change in behaviour, in which the stdout/stderr of the executed process will now be of bytes type, instead of a string type. Two new attributes, which are implemented as properties, have been added to the CmdResult class, `stdout_text` and `stderr_text`. Those are convenience methods that will return the same content that is in `stdout` and `stderr`, reespectively, but decoded on the fly[1]. With regards to encoding, if one is not provided, the result of `sys.getdefaultencoding()` will be used ("utf-8" for Python 3 and "ascii" for Python 2). Applications and/or tests using the APIs that return a CmdResult should, to the best of my knowledge, set a default encoding themselves so a stable behavior across Python versions. But that if left to users of this API. A different tradeoff/design decision has to do with the tests modified here. One option is to have "text" (as in sequences of human readable glyphs) as being of Python type "str". On Python 2, "str" can be compared to "bytes" because a conversion will happen on demand. That is, the following is fine on Python 2: >>> result = process.run("command") >>> "expected" in process.stdout Where `expected` is of type "str" and `process.stdout` is of type "bytes". This is not true of Python 3, so either the types must match or a conversion must be done explicitly. The solutions to that are: 1) have these "text" as (of type) "bytes" in the source code itself, and avoid the conversion whenever possible 2) have "strings" in the source code itself, and use the conversion provided by `CmdResult.stdout_text` and `CmdResult.stderr_text`. The approach chosen here is to avoid conversion if possible, that is, use "byte" types, given the fact that the source code encoding is by default 'ascii' and most of the "text" dealt with here can be represented in 'ascii' too. This is equivalent of doing: result = process.run("command") b"expected" in process.stdout "errors: %s" % 0 in process.stderr_text [1] The obvious alternative, instead of decoding these on the fly would be to have multiple copies of the "same" data. This assumes that binary data produced on the stdout/stderr will usually be larger than textual data. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 15 2月, 2018 2 次提交
-
-
由 Cleber Rosa 提交于
This is similar to the xunit unittest changes in 353fed04, but now applied to the functional tests which happen to use the same features. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
This is similar to the change in 418bf92a, but now applied to the functional tests that deal with xunit. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 12 2月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
Avocado used to provide support for "test aliases", that is, one could call "avocado run synctest" when the file containing the test was named "synctest.py". See e65ff614 for an example. Since this "feature" has been long removed, let's remove the tests also. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-