On Wed, 2010-09-15 at 23:17 -0300, Lucas Meneghel Rodrigues wrote:
> Just like in the results interface, provide a way for users
> to monitor certain conditions of their own tests by providing
> a flexible test filter, that will locate the tests that attend
> to a particular condition and calculate rates based on it, set
> in the file global_config.ini.
>
> Example: Let's suppose that we want to monitor tests that
> failed and that do not have the test attribute 'bz', that is,
> do not have a test attribute bz with a bugzilla number associated,
> one could simply set on global_config.ini, on the session
> SCHEDULER:
>
> email_test_db_filter: 'status <> 'GOOD' AND `test_attribute_bz`.value IS NULL'
>
> And this would give the list of tests that attend to the
> above condition, a test count and a percentage of the tests
> that attend that condition considering the total amount of
> tests executed. The global_config.ini key is properly commented.
>
> Also, introduce a new common_lib.utils function that generates
> a pretty print representation of any matrix, that will
> adjust the length of all columns automagically, making the
> resulting e-mail report much prettier to see, even with very
> large test names. Example:
>
> header = ("Word1", "Word2", "Word3")
> rows = [["Heeeeeeeeeeeeeey", "Hey", "Eh"],
> ["Orange", "Nonononono", "Pineapple"],
> ["Egg", "Spam", "Bacon"]]
>
> result = matrix_to_string(rows, header)
>
> Gives:
>
> Word1 Word2 Word3
> Heeeeeeeeeeeeeey Hey Eh
> Orange Nonononono Pineapple
> Egg Spam Bacon
>
> Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
> ---
> client/common_lib/utils.py | 38 +++++++++++++++
> global_config.ini | 6 ++
> scheduler/scheduler_models.py | 102
> +++++++++++++++++++++++++++++++----------
> 3 files changed, 122 insertions(+), 24 deletions(-)
>
> diff --git a/client/common_lib/utils.py b/client/common_lib/utils.py
> index a117cec..827d2b2 100644
> --- a/client/common_lib/utils.py
> +++ b/client/common_lib/utils.py
> @@ -202,6 +202,44 @@ def open_write_close(filename, data):
> f.close()
>
>
> +def print_matrix(matrix, header=None):
^ Ok, this should be matrix_to_string... this is the result of my last
minute cleanup before sending the code to the mailing list... will fix
this and test a bit more before sending the v2, sorry.
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest