- 07 4月, 2016 1 次提交
-
-
由 Amador Pahim 提交于
When a job is timed out during a test execution, we fail the test and put status ERROR in the test. The job then exits with the rc AVOCADO_TESTS_FAIL. This patch fixes this, making the test status INTERRUPTED and the job to exit with AVOCADO_JOB_INTERRUPTED. Also, when a job is timed out before a test, the test is skipped and the job exits with rc AVOCADO_ALL_OK. For that case, this patch makes the job to exit with AVOCADO_JOB_INTERRUPTED instead, keeping the test status as SKIP. Given this change, now we have the following combinations of test status and job return code: Case1: - Test1: PASS - Test2: SKIP (TestTimeoutSkip) Job RC: AVOCADO_JOB_INTERRUPTED Case2: - Test1: PASS - Test2: INTERRUPTED (TestTimeoutInterrupted) - Test3: SKIP (TestTimeoutSkip) Job RC: AVOCADO_JOB_INTERRUPTED Case3: - Test1: PASS - Test2: FAIL - Test3: INTERRUPTED (TestTimeoutInterrupted) - Test4: SKIP (TestTimeoutSkip) Job RC: AVOCADO_JOB_INTERRUPTED Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
- 18 3月, 2016 1 次提交
-
-
由 Cleber Rosa 提交于
A test base on the external runner feature depends on both the external runner and the test URL. These two are always combined to generate the complete command that will be executed by Avocado. But, the Avocado command line application does not require URLs to be given on the command line, because these may come from other sources on loaders other than the basic FileLoader. So, let's also explicitly require a URL to be given to to the External Runner loader to return a test factory (class and parameters). Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 16 3月, 2016 1 次提交
-
-
由 Lukáš Doktor 提交于
While working on the avocado logging system we thought it'd be consistent and better to log certain streams to sys.stderr rather than sys.stdout. It turned out to be a bit confusing and unexpected, so after a discussion this commit adjusts the streams to: * avocado.app - loglevel <= info goes to stdout - loglevel > info goes to stderr * other streams - go always into stdout * sys.stdout - goes to sys.stdout when enabled * sys.stderr - goes to sys.stderr when enabled - goes to sys.stdout when enabled as test output Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 10 3月, 2016 1 次提交
-
-
由 Cleber Rosa 提交于
Given the last CI jobs, RunnerSimpleTest:test_kill_stopped_sleep() has been failing often. The obvious reason, given the nature of the test and the heavily shared and loaded computing resources they run on, is the lack of resources. One example of such as failure: ====================================================================== FAIL: test_kill_stopped_sleep (selftests.functional.test_basic.RunnerSimpleTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/avocado-framework/avocado/selftests/functional/test_basic.py", line 549, in test_kill_stopped_sleep % proc.get_output()) AssertionError: Avocado process still alive 1s after job-timeout: JOB ID : 5c65a06b4ab15e69d6c4a1fc762368e0e99cbc1f JOB LOG : /tmp/avocado_selftests.functional.test_basicHIyhV4/job-2016-03-09T15.08-5c65a06/job.log TESTS : 1 (1/1) /bin/sleep 60: ctrl+z pressed, stopping test (5046) ERROR So, let's give 4 extra seconds for the process to be terminated. Hopefully failures in the timeout handling will still be revealed given the relatively small buffer. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 04 3月, 2016 1 次提交
-
-
由 Cleber Rosa 提交于
The configurations related to the "data_dir" are currently read at module load time. This means that changes in the configuration between module load time and changes to the settings (such as parsing an additional config file) is never seen. Since the avocado command line application parses extra configuration files (given with `--config`) after the module is loaded, these extra configuration files are never applied to the data_dir configuration. There's one more issue with regards to the the settings usage: because once references to the `settings` instance singleton are grabbed, they will always point to the same settings objects. The data_dir unittests exercise changes to the settings objects by replacing that instance. So, let's refer to the settings using the full location (module.attribute), which will always give back the "current" (be it original or replaced) settings instance. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 03 3月, 2016 2 次提交
-
-
由 Lukáš Doktor 提交于
This check "avocado -v" produces correct output and returns 0. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
The `--silent` argument is valid for all commands, let's add it to the core avocado args. For backward compatibility keep supporting it in "run" subcommand too. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 24 2月, 2016 2 次提交
-
-
由 Cleber Rosa 提交于
This commit changes the idiom on (hopefully all) except statements, from: except foo, details: to: except foo as details: Which is compatible with both Python 2 and 3. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Lukáš Doktor 提交于
This patch changes the way logging is initialized in avocado app: 1. stdout/stderr/logging is replaced with in-memory handlers 2. when arg parsing is done, logging is reconfigured accordingly to setting and re-logs stored messages (when streams are enabled) 3. when job starts and "test" stream is enabled, "" and "avocado.test" streams are enabled 4. when job finishes and "test" stream enabled the additional outputs, the additional outputs are disabled again. The 3 and 4 is necessarily as the "" logger contains all logs including avocado initialization (stevedore, PIL, ...). This way the "test" stream still outputs everything, but only during the job-execution and not during avocado initialization and cleanup. (one can use "early" log to see those). Last but not least it keeps "avocado.app" output in stdout (and stderr), but it moves all other outputs to stderr instead. This is IMO better handling as one can distinguish between debug and "additional" output. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 12 2月, 2016 1 次提交
-
-
由 Lukáš Doktor 提交于
When we abort the test and the test ignores SIGTERM, avocado hangs for infinity. Let's wait a while and send SIGKILL. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 04 2月, 2016 1 次提交
-
-
由 Cleber Rosa 提交于
There is an issue when running SIMPLE tests with non absolute paths, example: $ echo "#!/bin/bash" > /tmp/test.sh $ echo "exit 0" >> /tmp/test.sh $ chmod +x /tmp/test.sh $ cd /tmp $ avocado run test.sh The previous work on the simple test runner, adding the filename property, actually fixes that bug, so let's add a functional test to avoid an regression. Reference: https://trello.com/c/nbhyILO0Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 03 2月, 2016 1 次提交
-
-
由 Lukáš Doktor 提交于
The "replay_map" allows to substitute the test class with custom class. The problem is, that the "methodName" defined in "test_params" might not exist in this class. We have two choices, either leave it up to the user, to substitute with a compatible class (eg. by creating the "methodName" in "__init__" before calling the super.__init__), or we can require them to always use given "methodName". This patch uses the second approach as it seems less magical to me. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 27 1月, 2016 1 次提交
-
-
由 Amador Pahim 提交于
Using an unknown option in a given subcommand leads argparse to show the main avocado usage instructions. This patch makes the argparse show the subcommand help instead. Also, argparse error exit code now matches error_codes.AVOCADO_FAIL, which makes more sense than error_codes.AVOCADO_JOB_FAIL. Reference:https://trello.com/c/o0TpH9aeSigned-off-by: NAmador Pahim <apahim@redhat.com>
-
- 07 1月, 2016 2 次提交
-
-
由 Cleber Rosa 提交于
There are a few leftover references to the old Plugin classes in the functional tests. Let's remove them. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Lucas Meneghel Rodrigues 提交于
If a test has local imports (a fairly common use case), we have to append the base test dir to sys.path. Otherwise, we end up having a horrible traceback as a result: Exception loading test Traceback (most recent call last): File "/home/lmr/Code/avocado.lmr/avocado/core/runner.py", line 200, in _run_test instance = loader.load_test(test_factory) File "/home/lmr/Code/avocado.lmr/avocado/core/loader.py", line 262, in load_test test_module = imp.load_module(module_name, f, p, d) File "scylla_longevity.py", line 5, in <module> from sdcm.tester import ScyllaClusterTester ImportError: No module named sdcm.tester Which is clearly not wanted. We had this problem before and now we have a regression. It's time for a functional test to make sure we don't regress again. Signed-off-by: NLucas Meneghel Rodrigues <lookkas@gmail.com> Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 18 12月, 2015 10 次提交
-
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Yes, too many plugin mentions, in this commit title, but that's what it really is, so please bear with it. Now that the plugin types have a finer granularity, let's show each plugin type (based on the namespace) as a separate section. Signed-off-by: NLucas Meneghel Rodrigues <lmr@scylladb.com> 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 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The Avocado command line application has "subcommands". So far, to execute these commands, a special method, named "dispatch" was set on the command line parser result object (aka Namespace) pointing to the `run` method of the same class. In truthfullness, the command line parser doesn't have too much to do with these methods. Also, the `set_defaults` method of the command line argument parser is not exactly intended for that use. So, let's ask the subcommands subparser to formally save the chosen subcommand, at well, `subcommand`, and nothing more. Since the application knows about the command plugins (the ones that inherit from CLICmdBase), and their interface now *require* a method called `run`, let's use the extension entry-point name to locate the underlying object and its `run` method. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
At this point, no plugin support exists in Avocado. This is in preparation for the new plugin code to be cleanly introduced. The plugins that play a role in the plugin architecture have been removed, since they wouldn't be functional under the new plugin management code. The ones that are add extra functionality to Avocado have been kept, and will be ported to the new architecture. Also, most of the functional tests have been temporarily disabled. The reason is that most of them run avocado, which depends on the run command, which in turn, depends on the plugin archicture code. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
This shows a more succint version of the help message (the so called "usage" information). It's a certainly a matter of taste and change of behavior, so this is marked as an RFC. It also avoids a hackish injection of the print_help method as the default dispatch method. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 03 11月, 2015 1 次提交
-
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 30 10月, 2015 2 次提交
-
-
由 Cleber Rosa 提交于
Since we define the meaning of each exit code, we should be using that ourselves. Functional tests have been coded using literal values, and there may be a good reason for that: proving that the API stands. But there's a big issue: we have not declared those codes as some kind of an external API and guarantee stability. Also the subsequent changes in this series actually change the meaning and values of those. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Lukáš Doktor 提交于
It's prone to mistakes maintain two separate ways to query for tests (running them and displaying available ones). This patch implements --dry-run, which follows the full "run" process, only instead of running the test it skips them. Additionally the --dry-run uses some tweaks to tell them apart from normal executions, namely: 1. No sysinfo gathering 2. Unique id is 0000000000000000000000000000000000000000 3. Unless user provides custom log location, fresh tmpdir is used Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 28 10月, 2015 1 次提交
-
-
由 Cleber Rosa 提交于
In preparation for the large plugin refactor, let's simplify the code ASAP and drop related (custom) functionality that is going to be replaced. Standard setuptools entrypoints is going to provide better capability then our custom code that supports external 'avocado_*.py'module loading. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 07 10月, 2015 2 次提交
-
-
由 Lukáš Doktor 提交于
This patch doesn't change any functionality, it only renames the inner_runner to external_runner (the plugin is called simply external) Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
Autopep8 style cleanup + alphabetic import + import cleanup in avocado.core.{loader,test} and selftests.functional.test_basic. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 01 10月, 2015 1 次提交
-
-
由 Lukáš Doktor 提交于
Currently we can only specify the loader plugins order via settings. This patch adds "--loaders" argument and improves the granularity. Now it's possible to set either @plugin_name, or TEST_TYPE, where TEST_TYPE is the mapped name of the plugin (eg. SIMPLE, VT, ...) There is one special name "DEFAULT", which injects all unspecified loaders in the position of the "DEFAULT" keyword. When "DEFAULT" is not specified, not-listed plugins/test_types are not evaluated. (therefor it's possible to restrict some test loaders or only some test types). As the usecase changed slightly, the settings option was renamed from plugins.loader_plugins_priority to plugins.loaders. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 30 9月, 2015 3 次提交
-
-
由 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>
-
由 Lucas Meneghel Rodrigues 提交于
Let's use a simple passtest to check for latest result, and let's wait for avocado to finish. That should accomplish the same result in a shorter and nicer way. Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-
由 Lucas Meneghel Rodrigues 提交于
-
- 24 9月, 2015 1 次提交
-
-
由 Lukáš Doktor 提交于
The Xunit and JSON test cases inherit from PluginsTest. This test defines some hardcoded-values tests, which are then inherited and run for each inherited class with the exact same values. This patch creates abstract class, which all 3 cases share and makes them inherit from it, rather than from the actual testcase. Signed-off-by: NLukáš Doktor <ldoktor@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>
-
- 14 8月, 2015 1 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
Add some functional tests that ensure that we don't get caught by mistakes made when modifying the human test reporting code again (or at least, not by the obvious ones). Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-
- 13 8月, 2015 1 次提交
-
-
由 Cleber Rosa 提交于
In some external test suites, what is defined as a "test" can not be run by itself and need a specific runner script/tool. This introduces the concept of an "inner runner", that is, a custom test runner or tool that can deal with custom tests that do follow the Avocado SIMPLE test definition. This implements the Trello card: https://trello.com/c/TpXecE2n/486-introduce-inner-runner-to-avocado-run More information can be found in the man page section about it. Changes from v1: * removed "level" from "inner level runner" mentions * replicated docs from man page to "main" docs Signed-off-by: NCleber Rosa <crosa@redhat.com>
-