- 04 3月, 2016 2 次提交
-
-
由 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 18 次提交
-
-
由 Cleber Rosa 提交于
-
由 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 5 次提交
-
-
由 Cleber Rosa 提交于
-
由 Lukáš Doktor 提交于
When avocado fails to update the link to the latest results, the whole job is aborted. This is unfortunate and after a discussion we considered this as a "soft" issue. With this patch we only log an information, that the latest link was not updated into the job-log and proceed to testing. This commit also extends the link creation to be concurrent-execution-safe by creating `latest-$PID` symlink first and then renames the symlink to `latest`. The rename is atomic operation and does not suffer the delete->create problem, where other process creates the file before this one. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
Safe Loader: a second, more abstract and reusable implementation [v2]
-
由 Cleber Rosa 提交于
-
由 Amador Pahim 提交于
Find for files in multiple locations, caching it when successfully fetched. Available as fetch_asset() method in avocado.Test(). Reference: https://trello.com/c/KTeMIx0uSigned-off-by: NAmador Pahim <apahim@redhat.com>
-
- 01 3月, 2016 2 次提交
-
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
Python 2.6 does not support --user in `python setup.py develop`. Let's use system-wide develop when link/unlink is executed with python 2.6. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 29 2月, 2016 8 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
Test namespace cleanup [4th round]
-
由 Cleber Rosa 提交于
The get_data_path utility API of the Test class is a convenience, it simply joins the name of a given file to the datadir location. IMHO the value is low when compared to the pollution of the namespace and yet another compatibility/stability promise. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The supported interface for getting the test tagged name is the attribute `tagged_name`, so there's no need to make this utility method visible on the API. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
These two attributes are simply utility logger instances that test writers can use to write "directly" to the test process' STDOUT and STDERR. I agree that having those ready to use inside a test is a nice to have, but I don't think it justifies the polution to the test class namespace. Let's remove those and document how the user can use Python's standard logging API to retrieve the logger instances that Avocado provides to tests. This will continue to exist and be supported. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The default tag in the class constructor already is None, so no there's no need for the conditional assignment here. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The Avocado Test class inherits from unittest.TestCase, and for that matter it already contains implementations of setUp and tearDown. It could be argued that the point is to better document those, but then the same logic should be applied to all other unittest.TestCase methods. So, given that argument, let's remove those. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
IMO it makes sense for the filename property of the Test class to check if the detected source code file actually exists. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The current approach using "string.rstrip()" is buggy and can remove unintended characters. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 25 2月, 2016 2 次提交
-
-
由 Amador Pahim 提交于
avocado.core.test: Refactor *SkipTests and support extra params [v2]
-
由 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>
-
- 24 2月, 2016 3 次提交
-
-
由 Amador Pahim 提交于
Python 3 partial support [v2]
-
由 Cleber Rosa 提交于
As string.letters is gone on Python 3. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Python 3 is more strict about I/O to files not openend in text mode. Let's encode the message in utf-8 and have bytes written to the traceback log file. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-