- 14 10月, 2017 1 次提交
-
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 13 10月, 2017 1 次提交
-
-
由 Cleber Rosa 提交于
This test currently creates some Avocado test instances (as part of the test itself) that doesn't get used. Let's limit the creation to where they're used. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 06 10月, 2017 2 次提交
-
-
由 Cleber Rosa 提交于
And remove the requirement on flexmock on this module. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Basically, this is not about switching to mock instead, because mocking properties is more challeging with mock, and mocking a property of an existing instance is, to the best of my knowledge, not possible. So, it seemed like a good idea to use a different test class with an overloaded property that returns the fake filename, and while at it, separate split that into two other tests. It should be easier to understand what each block (now a test) is about. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 03 10月, 2017 1 次提交
-
-
由 Lukáš Doktor 提交于
Windows does not allow `<>:"/\|?*` characters in the filename. Let's include these in our `astring.string_to_safe_path` method and use it everywhere we create files. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 20 9月, 2017 1 次提交
-
-
由 Amador Pahim 提交于
The issue is with ":", not with ";". We changed the wrong character. This reverts commit 60a65d20. Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
- 15 9月, 2017 2 次提交
-
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 23 8月, 2017 2 次提交
-
-
由 Cleber Rosa 提交于
The current TestName class records more than a test name (according to the Avocado specification). It records, and by default, presents the Test ID (__str__() and __repr__()). The Test Name, again according to the Avocado specifications, is contained within a Test ID, so it's not necessary to have two different classes IMO. Finally, the str_filesystem() method was adapted to be coherent with the fact that it returns a file system representation of the Test ID, not the Test Name. It also became a property, to match the same use of str_uid and str_variant. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Python code should not be doing type check/enforcement. This bit was here temporarily, when the name parameter to avocado.core.test.Test got changed. Now it's way past time to remove it. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 22 8月, 2017 1 次提交
-
-
由 Cleber Rosa 提交于
The vast majority of selftests do not use CamelCase, but some still remain. Let's stick to a single naming pattern. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 27 4月, 2017 1 次提交
-
-
由 Amador Pahim 提交于
Due to the deprecation of the self.skip(), the availability of the skip decorators and the new CANCEL status, some internal improvements are important to keep our behaviour sane and our own code sound and clean. - The test.SkipTest class was renamed to test.MockingTest to be even more generic, intending to be overridden by sub-classes that make the test to end both with SKIP or CANCEL status. To keep it generic, test.MockingTest class will not SKIP the test if used directly anymore. - The test.TimeOutSkipTest and test.ReplaySkipTest classes now are using the skip decorators instead of raising an exception in setUp(), since 'skipping' the test means 'don't execute anything', not even the setUp(). - The test.DryRunTest class, which is expected to log itself in setUp() and then abort the test execution, is now using self.cancel() (instead of raising a SKIP exception), being now compliant with the concept that a SKIP test cannot execute anything. - Selftests were adjusted accordingly. Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
- 04 3月, 2017 1 次提交
-
-
由 Lukáš Doktor 提交于
Currently the variant format is (variant_id, (variant, mux_path)) which is not really scalable, nor user friendly. Let's use a dictionary instead. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 24 2月, 2017 1 次提交
-
-
由 Lukáš Doktor 提交于
This should help beginners to identify the issue when accidentally overriding test's public variables. Also add a unittest to support this note. Signed-off-by: NLukáš Doktor <ldoktor@redhat.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>
-
- 03 2月, 2017 1 次提交
-
-
由 Lukáš Doktor 提交于
This PR adjusts our tests to avoid producing results in the default results directory (usually caused by instantiating Job or Test without a results dir). One of the tests still produces test results as it is essential for the test execution, but it goes through the produced tests and removes the base directory. Signed-off-by: NLukáš Doktor <ldoktor@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>
-
- 23 7月, 2016 1 次提交
-
-
由 Cleber Rosa 提交于
When the support for Test IDs was introduced, support for string based test names and tags was kept in deprecated mode, scheduled to be removed on an upcoming release. This planned upcoming release for removal has already passed, so let's remove them now. Reference: https://trello.com/c/QqZmfkYtSigned-off-by: NCleber Rosa <crosa@redhat.com>
-
- 26 4月, 2016 1 次提交
-
-
由 Lukáš Doktor 提交于
This commit implements the serialized test ids described in the Introduce proper test IDs RFC. https://www.redhat.com/archives/avocado-devel/2016-March/msg00024.html It implements `TestName` class, which contains the test uid, test name and the variant uid and allows querying for the file-system-friendly name. The workflow is: 1. tests are discovered, name is translated to "Test Name" by loader 2. test_suite is passed to the runner (new) along with the number of tests+variants to be executed (used to get number of digits) 3. the Mux (params generator) yields the template + (new) variant id 4. the runner replaces template['name'] to TestName(uid, test_name, variant_id); where uid is currently no executed tests, test_name is the original name from Loader and variant_id is either None or the variant index. This commit makes the `tag` argument unused. To avoid problems a warning is issued on it's usage so we can remove it in the upcoming releases. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 14 4月, 2016 3 次提交
-
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Lukáš Doktor 提交于
We're substituting `os.path` with flexmock, let's not forget to clean-up properly. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
only the basename of the `self.filename` has to be shorter than maxsize-5, not the full path. Also the IOError in selftest is rather misleading as it relates to missing source file. Let's just check the path is correctly set and additionally verify `_record_reference_*` is not crashing when filename not associated. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 11 4月, 2016 2 次提交
-
-
由 Lukáš Doktor 提交于
The leading "." makes files invisible on unix systems, which might be confusing to users. Let's replace with "_". Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
This adds selftests regarding the long filenames fixes. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 25 2月, 2016 1 次提交
-
-
由 Lukáš Doktor 提交于
All *SkipTests are now inherited from "SkipTest" baseclass. This baseclass contains improved __init__ which removes any unsupported parameters from the Test.__init__ super call. This is because those classes are used to substitute other avocado test classes, for example "avocado-vt" tests which contain "vt_params" argument unsupported by Test.__init__. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 30 9月, 2015 1 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
Make sure we have avocado_ + __name__ prefixes to the dirs created with tempfile, so that we have an easy way to spot when we are not cleaning up directories properly. This mostly concerns unittests, although the kernel_build lib and the iso9660 lib also uses that API. Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-
- 03 9月, 2015 2 次提交
-
-
由 Cleber Rosa 提交于
Even though I may be the one to blame about coming up with this "simple import magic", I believe it was a mistake and we should get rid of them. There are a couple of other ways to actually do development out of of a source tree, including running unittests that do not require this amount of boiler plate code. Examples include just setting the PYTHONPATH environment variable to actually run (setuptools based) `python setup.py develop`. The little bits of what looks like the import magic that was left, is not really import magic. It's just that functional tests need to locate the Avocado source tree base directory to run the test runner from it. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 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>
-
- 31 7月, 2015 1 次提交
-
-
由 Lukáš Doktor 提交于
On multiple places we modify the sys.path to make avocado work from sources. Instead of `append` we should `insert` the path as when running from avocado sources directory, we want to use the modules from here, rather than from installed version. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 18 6月, 2015 1 次提交
-
-
由 Lukáš Doktor 提交于
The runTest method has been obsoleted and everyone should be using "test*" method(s) instead. This patch removes the support and replaces the default and example entry points to "test". Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 12 6月, 2015 1 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
Introduced with commit d6abdcd4, avocado tests no longer report correctly to the unittest runner. The reason is that there is a structure that must be correctly updated by the run() method (the result instance), that was not being updated in the new implementation. Therefore, one possible fix, presented here, is to once again *not* implement run() at all. this way we avoid messing around with internal data structures, and when avocado is executed under nosetests, or the default unittest runner, we get the expected behavior of the method. The downside is that we have less perceived integration among both classes. Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-
- 09 6月, 2015 1 次提交
-
-
由 Cleber Rosa 提交于
Only avocado.Test is of general interest to test writers. For that reason the entire test module has been moved to the avocado.core namespace. The recommended way to go about writing instrumented tests is something like: from avocado import Test class MyTest(Test): def test_foo(self): do_stuff() Changes from v2: * Fixed references in docstrings * Fixed refrences of avocado.test in Writing Test Guide docs Changes from v1: * Fixed comment typo on commit message * Fixed old reference of avocado.test (then test.Test) instead of avocado then Test in GDB docs. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 14 4月, 2015 2 次提交
-
-
由 Rudá Moura 提交于
To avoid making SimpleTest a special case, use the same parameters that any avocado test class should use, so that the parameter `path` is now `name`. Signed-off-by: NRudá Moura <rmoura@redhat.com>
-
由 Lucas Meneghel Rodrigues 提交于
It turns out that the test classes defined at the top of the unittest file were being loaded, therefore directories were being created at the ~/avocado/job-results directory. We can fix that by moving the auxiliary class definitions to the unittest class itself. Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-
- 07 4月, 2015 1 次提交
-
-
由 Rudá Moura 提交于
We're going one step ahead to unittest compatibility. Now we obsolete action() method and use runTest(). Then what is runTest() will be run(). Update the selftests and tests regarding this modification. Signed-off-by: NRudá Moura <rmoura@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>
-
- 09 1月, 2015 1 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
Nosetest by default doesn't like executables, I find it useful when developing to see how nosetest executes our tests. Besides, it shouldn't modify the results of our custom made suite. Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-
- 11 12月, 2014 1 次提交
-
-
由 Rudá Moura 提交于
Due the concept of "drop-in" tests didn't match the actual purpose of running any script or binary as a test in Avocado, we're going to use the term "simple test" (defined in SimpleTest class) to contrast with "native test", which are Python modules that uses Avocado's API. Signed-off-by: NRudá Moura <rmoura@redhat.com>
-
- 28 11月, 2014 1 次提交
-
-
由 Rudá Moura 提交于
Remove the license text from files inside docs, examples and selftest, to keep the license text only in relevant parts of the project. References: * https://fedoraproject.org/wiki/Packaging:LicensingGuidelines * https://www.gnu.org/licenses/gpl-howto.htmlSigned-off-by: NRudá Moura <rmoura@redhat.com>
-