- 16 3月, 2016 7 次提交
-
-
由 Lukáš Doktor 提交于
PEP8 recommends to import global variables from other modules rather than re-using them. This patch replaces the `output.STD_OUTPUT` one and removes the unnecessary wrapper around `STD_OUTPUT.close()`. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 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>
-
由 Lukáš Doktor 提交于
We decided, that the "--silent" mode should keep the stderr enabled. This commit adjusts the code accordingly. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
Currently we use global variables and store combined stdout/stderr streams into one in-memory object. This suits for ordering purposes, but does not keep the information of what stream was the message written to. This commit creates a wrapping class, which uses the shared storage (list) to store messages altogether with the stream they were used with. Additionally this class provides some basic handling of streams and we can avoid using global variables. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
No actual changes, just couple of docstring fixes. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
We must reflect the environment variables later in code, therefor we need to reorder the way we discover what streams are enabled. Additionally don't return early on `--silent` as env-variable might already enable some streams. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
The advised names for top level variables is UPPER_CASE. Let's respect that. Also the TERM_SUPPORT could be useful for logging initialization, therefor this commit moves it above it. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 12 3月, 2016 2 次提交
-
-
由 Cleber Rosa 提交于
-
由 Amador Pahim 提交于
Fabric automatically echoes all text typed into the terminal back out to the user. This makes avocado treat the echoed strings as fabric return. This patch disables terminal echo in fabric. Reference: https://trello.com/c/xqN7bq6NSigned-off-by: NAmador Pahim <apahim@redhat.com>
-
- 11 3月, 2016 2 次提交
-
-
由 Amador Pahim 提交于
Test: increment to tagged name not applied on "unsafe" names
-
由 Cleber Rosa 提交于
Depending on the name of the test, it may need a "safe" tagged name, that is, one that can be turned into a filesystem path. Most, if not all, cases apply to SIMPLE tests, that have slashes in the test names, such as "/bin/true". The test class code needs to check if the "safe" test name directory exists, and apply the incremental numeric tag to it. Also, an explicit check that raises a test setup failure was added, so that Avocado won't silently reuse an existing test log dir. Reference: https://trello.com/c/nPrrRv5NSigned-off-by: NCleber Rosa <crosa@redhat.com>
-
- 10 3月, 2016 2 次提交
-
-
由 Amador Pahim 提交于
selftests/functional/test_basic.py: extend timeout on test_kill_stopp…
-
由 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>
-
- 09 3月, 2016 4 次提交
-
-
由 Cleber Rosa 提交于
-
由 Cleber Rosa 提交于
-
由 Amador Pahim 提交于
Trying to follow the docs to install avocado from source, make requirements command fails doe to the missing dependencies. This patch adds the two missing dependencies I had to install in addition to the listed in docs. Reference: https://trello.com/c/1ryTxsXwSigned-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Amador Pahim 提交于
Record the args and reload loader options on job replay. Reference: https://trello.com/c/N3UCnR05Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
- 04 3月, 2016 3 次提交
-
-
由 Amador Pahim 提交于
data_dir: make settings dynamic
-
由 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>
-
由 Cleber Rosa 提交于
The current implementation of _get_bogus_settings() solves a partial need of the setUp() method. Let's combine both into a single (private) utility method (_get_temporary_dirs_mapping_and_config()) that can be re-used. The major goal is to re-use it when testing how data_dir reacts to changes in the settings at run time. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 03 3月, 2016 19 次提交
-
-
由 Cleber Rosa 提交于
-
由 Amador Pahim 提交于
We do use default to None everywhere. external-runner-chdir seems to be the only exception, being defaults to 'off'. This was harmless until we need to record external-runner-chedir to further retrieve it in replay jobs. This patch changes external-runner-chdir default from 'off' to None. Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Amador Pahim 提交于
Asset fetcher changed the fallback directory to be the data_dir/cache isntead of a test temporary directory. This patch reflects in docs that change. Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Cleber Rosa 提交于
-
由 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>
-
由 Lukáš Doktor 提交于
This patch assumes "silent" arg has the highest priority and it silents all output including the one enabled by env variables. The reason is this handling is cleaner and it allows us to enable the root logger, which is used by our utils and virttest. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
This adds option --store-logging-stream, which allows users enable logging to file $JOB_RESULTS/$STREAM.$LEVEL. It will not create those files in $TEST_RESULTS directory! Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
The "View" concept was developed to abstract the messages and events. The problem is it was only abused to pass the status to other places, to colorize the messages and to allow creating paginated view. There already is a nice class hooked to all important events, the "TestResult". For (not only human readable) messages this commit uses the standard python logging as it's pretty well known, widely used and very scalable. The colored output is handled by already existing "ProgressStreamHandler", which maps: DEBUG,INFO,WARNING and >=ERROR messages to previously existing: minor, message, warning and error event types. The paginator was unified and is initialized during logging reconfigure. During reconfigure all previously logged messages are re-logged into the output so one does not lose those messages. Another great difference is that the Paginator is cleaned at exit by avocado and does not require complex handling to avoid broken console. To use paginator one just enables it in "args" and writes to any available stream/stdout/stderr Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
The "args.show" is used later in job. If the value is changed by other arguments (like --silent) it needs to be updated, otherwise the job can't react it properly. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
This contains some import cleanups, few docstring updates and escaped new line fixes. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
By default we only enable >ERROR or ==INFO levels to be used with the ProgressStreamHandler. This limits the possibilities for future improvements. Let's switch it to >=WARN (stderr) and <=INFO (stdout). Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
Both "stream" and "args" are present in the job. Let's only pass the "job" object and let the Result class to take the needed objects. Additionally allow overriding the output for json/xunit/html in order to allow users to specify different value than the one from args. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
The logging stream can be optionally followed by ":$LOG_LEVEL" either using number, or the symbolic python logging level (INFO). Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
When avocado crashes before the "parser.start()" is finished, "parser.args" is None and we fail to reconfigure the logging. This patch initializes empty Namespace in such case. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
The TermSupport detects compatible terminal to enable or disable colors. Let's extract this function to make the initialization easier to read and also make this function available to the whole framework. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
The --log is a bit confusing, let's use --show to emphasize we're dealing with the console output. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Cleber Rosa 提交于
-
- 02 3月, 2016 1 次提交
-
-
由 Cleber Rosa 提交于
-