- 25 7月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
Implementation of the CIT varianter optional plugin. Signed-off-by: NAmador Pahim <amador@apahim.org> 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 3 次提交
-
-
由 Merlin Mathesius 提交于
Signed-off-by: NMerlin Mathesius <mmathesi@redhat.com>
-
由 Merlin Mathesius 提交于
Signed-off-by: NMerlin Mathesius <mmathesi@redhat.com>
-
由 Cleber Rosa 提交于
Given that the implementation of the code to find Avocado Instrumented Tests is already quite big, and that a good part of it already lives in the safeloader module, let's complete the move. This sets the tone of having the generic loader mechanism in the "avocado.core.loader" module, while having implementations, at least for the instrumented test at this point, in the "avocado.core.safeloader" module. With this change, the loader knows nothing about ast, and relies on safeloader.find_avocado_tests() only. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 17 7月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
Formatting bytes was only introduced on Python 3.5, so let's just add the bytes. At the same time, there's no need for some of that content to live in the module namespace, as only STDOUT and STDERR are used later in the tests. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 16 7月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
The current implementation fails to cache multiple files if their name is the same. The filename *only* will be considered when looking at the cached directories, and if hashes are not given, users will end up with the wrong files, even when they give unique URLs to different files. To give a real example, suppose we have one test that needs a specific asset file (such as an specific kernel version): def test_x86_64(self): self.fetch_asset('https://avocado-project.org/data/linux/x86_64/vmlinuz', asset_hash='0123456789abcdef...') While a second test wants the daily version of a given asset: def test_aarch64(self): self.fetch_asset('https://avocado-project.org/data/linux/aarch64/vmlinuz', expire='1d') If test_x86_64() runs first, it will write to $CACHE_DIR/vmlinuz. The second test, test_aarch64(), may end up having the completely wrong file. Using `asset_cache` is not a possibility, given that it wants the daily kernel. These changes put asset files on a "cache relative directory". If a hash is given, it's safe to put files in a directory indexed "by name". If not, they're put in a directory named after the URL (minus the filename). Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 04 7月, 2018 2 次提交
-
-
由 Lukáš Doktor 提交于
Let's double-check the recorded output is correct and not just it's presence. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
This logger is used by stdout/stderr recorder. We decided to keep it in text-mode so let's treat the encoding errors by using "astring.to_text" and "xmlcharrefreplace" error handling in case odd characters are present. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 29 6月, 2018 1 次提交
-
-
由 Lukáš Doktor 提交于
It has been reported that on some occasions python can report extra lines when the pipe is broken: python2 -c 'print("Hello, World!")' | no-such-command -bash: no-such-command: command not found close failed in file object destructor: sys.excepthook is missing lost sys.stderr Let's remove the check for the number of lines and only keep the check for unexpected words. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 27 6月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
This change reveleaed a couple of location in the symbolic names where not being used, but their special values were being evaluated. Let's avoid using the special (and subtle) meaning of ALL (True) and DEFAULT/AVAILABLE (which evaluate to False). The enum library is part of the standard library, starting from 3.4 (which is the mininum version we require for Avocado). On Python 2.7, we can rely on the backport package. This is of course not necessary right now, but I feel that we can continue modernizing the code base, and not wait for 2020 and then be liberated to use newer constructs and libraries. Reference: https://trello.com/c/k90E1kdg/1357-loader-remove-compatibility-aliasesSigned-off-by: NCleber Rosa <crosa@redhat.com>
-
- 26 6月, 2018 5 次提交
-
-
由 Lukáš Doktor 提交于
These top level variable names are internal and should not be used by other modules (hopefully). Let's adjust them to python style. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
Let's add expected returns for all supported commands. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
The TestRunCalls is quite hard to follow, let's simplify it with simple but readable code. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
Many arguments are provided by plugins, let's suggest checking the installed plugins on unrecognized argument to raise awareness of the need to install additional plugins which might help people that see Avocado for the first time. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
Currently when Paginator fails to execute the paginator command it redirects the output to "sys.stdout" redirecting the output. This is not necessary and actually broken currently as "sys.stdout" is at that point already a different object. Let's fail and treat the error instead of redirecting the output. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 23 6月, 2018 1 次提交
-
-
由 Lukáš Doktor 提交于
Currently TAP plugin includes test logs. This changed several times in the history, but mainly is not needed, so let's disable it by default and add argument to enable it. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 20 6月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
During the parallel execution of unittests, only conditions for FAIL and ERROR are checked. Under Python > 3.4, that's fine because load failures are treated as FAILures: $ python3.6 Python 3.6.5 (default, Mar 29 2018, 18:20:46) [GCC 8.0.1 20180317 (Red Hat 8.0.1-0.19)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import unittest.loader >>> l = unittest.loader.TestLoader() >>> l.loadTestsFromName('selftests.unit.test_utils_cpu.Cpu.test_cpu_arch_ppc64_power8') <unittest.suite.TestSuite tests=[<unittest.loader._FailedTest testMethod=test_utils_cpu>]> But, under Python 3.4, no such treatment is done: $ python3.4 Python 3.4.3 (default, Jan 13 2018, 13:06:46) [GCC 7.2.1 20170915 (Red Hat 7.2.1-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import unittest.loader >>> l = unittest.loader.TestLoader() >>> l.loadTestsFromName('selftests.unit.test_utils_cpu.Cpu.test_cpu_arch_ppc64_power8') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/cleber/.local/lib/python3.4/unittest/loader.py", line 114, in loadTestsFromName parent, obj = obj, getattr(obj, part) AttributeError: 'module' object has no attribute 'test_utils_cpu' This implements a simple check for load failures, which is not perfect, but better than none. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 19 6月, 2018 1 次提交
-
-
由 Narasimhan V 提交于
AVOCADO_TEST_DATADIR is deprecated. Removing them from the examples and selftests. Signed-off-by: NNarasimhan V <sim@linux.vnet.ibm.com>
-
- 12 6月, 2018 8 次提交
-
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The check for mock version is only applicable to Python 2 versions, Python 3 is fine on the versions we support. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Instead of using integers or even strings, let's use a more Pythonic interface to disable/enable idle states. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The Linux Kernel will not change the content of those files based on locale. So, let's stick with honest binary mode when reading those files. While at it, also change the regex patterns, as they wi'll be matched agains /proc/* and /sys/* content, which should really be treated as binary. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Radek Duda 提交于
Signed-off-by: NRadek Duda <rduda@redhat.com>
-
由 Radek Duda 提交于
reset-failed, mask, unmask options are added to service management ((majority of which are transerred from https://github.com/avocado-framework/avocado-vt/blob/master/virttest/staging/service.py) - see avocado-framework/avocado-vt#1565) Signed-off-by: NRadek Duda <rduda@redhat.com>
-
由 Radek Duda 提交于
If `service_manager` is called multiple times, its previous instance is used. The problem arises if different runner is used. Because it leads to situation when service commands are passed to wrong VM or service is run as systemd insted of SysVinit or vice versa. Global variables, where information from previous run were stored were thus removed as well as then unused functions. Selftest for two different calls was also added. Steps to invoke: ``` ssn_c = vm_client.vm.wait_for_login() runner = remote.RemoteRunner(session=ssn_c) vdagentd = service.specific_service_manager("spice-vdagentd", run=runner.run) vdagentd.stop() # send to vm_client ssn_g = vm_guest.vm.wait_for_login() runner = remote.RemoteRunner(session=ssn_g) vdagentd = service.specific_service_manager("spice-vdagentd", run=runner.run) vdagentd.stop() # send to vm_client (again!) ``` As a trade-off this may affect speed when invoked in a loop since `service_manager` won't be cached any more. Signed-off-by: NRadek Duda <rduda@redhat.com>
-
Moved original whiteboard example test to selftests and then created a simpler example code. Reference: https://trello.com/c/sG6J0VpwSigned-off-by: NWainer dos Santos Moschetta <wainersm@redhat.com>
-
- 11 6月, 2018 3 次提交
-
-
由 Cleber Rosa 提交于
The `avocado.Test.datadir` attribute has been deprecated, and it's now time to have it removed for good. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
After the deprecation, comes the removal. Hopefully, "workdir" is now being used in tests by now. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 09 6月, 2018 3 次提交
-
-
由 Lukáš Doktor 提交于
It might happen that user runs process with encoding that is ritcher than system one. This is fine by the process as internally it stores encoded bytes object, but the drainer might fail attempting to log the output. Those failures should not be critical as, under described circumstances, the unavailability of the output is expected and should not prevent the execution. Let's simply replace those characters using 'replace' (the 'xmlcharrefreplace' might fail with ASCII coder) and keep processing the data. To simplify error handling new "astring.to_text" argument "errors" is added. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com> Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
These short exception detail variables are just one of the many "invalid-name" violations we have. Better have some fixed than none. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Merlin Mathesius 提交于
Signed-off-by: NMerlin Mathesius <mmathesi@redhat.com>
-
- 08 6月, 2018 2 次提交
-
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Instead of raising a generic exception about not being able to fetch the file, let's tell the user upfront that the protocol is not supported. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 06 6月, 2018 1 次提交
-
-
由 Abdul Haleem 提交于
This patche takes care of Slot format for ibm and openpower machines * S0001 * Slot1 * SLOT1 * Backplane USB * U78CB.001.WZS07CU-P1-C9-T1 (should return U78CB.001.WZS07CU-P1-C9) * Onboard USB Respective unit test has also been added test_utils_pci.py Signed-off-by: NAbdul Haleem <abdhalee@linux.vnet.ibm.com> Signed-off-by: NNarasimhan V <sim@linux.vnet.ibm.com>
-
- 30 5月, 2018 1 次提交
-
-
由 Satheesh Rajendran 提交于
Add methods to get/set cpuidle states in host and selftests for the method. Signed-off-by: NSatheesh Rajendran <sathnaga@linux.vnet.ibm.com>
-
- 28 5月, 2018 1 次提交
-
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 24 5月, 2018 1 次提交
-
-
由 Harish 提交于
This patch adds method to get list of nodes with memory on given machine. Signed-off-by: NHarish <harish@linux.vnet.ibm.com>
-
- 21 5月, 2018 1 次提交
-
-
由 Harish 提交于
Patch adds comma_separated_ranges_to_list utility to return a list of integers from comma separated range values Signed-off-by: NHarish <harish@linux.vnet.ibm.com>
-