ATF-devel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: test case metadata



On Mon, Apr 19, 2010 at 9:02 AM, Stathis Kamperis 
<ekamperi%gmail.com@localhost> wrote:
> Hi all,
>
> what's the purpose of defining test case metadata such as `descr' via
> atf_tc_set_md_var() ?

Hello Stathis,

The idea of the metadata was two folded:

* First, it allows test cases to describe their restrictions in a
declarative way.  The internal test code program (or atf-run in the
.nofork branch) checks this metadata and runs code to check if the
requirements are met or not.  This is to avoid code duplication.  For
example, a test case may require root privileges, or a specific
program to be installed, or a specific driver be present, etc.  Check
atf-test-case(4) for details.

* And second, to allow the user to query such metadata.  This was
supposed to let end users run test cases based on a query to such
metadata.  For example, run all tests related to bug number X, or run
all tests that require root because you just ran sudo.  At the moment,
none of this is implemented, and I'm not sure if it is valuable at all
to keep.

Keeping the metadata is something worth to consider.  Killing this
support altogether could be a worthy simplification (unless we can
envision a nice use case for it).  However, in the .nofork branch, the
metadata is nice to have because atf-run can run all requirements
tests on itself, so that test programs need to have much less code to
maintain (and less code duplication in different languages).

As for the description, it is visible if you run the test case with the -l flag.

Any comments?

-- 
Julio Merino


Home | Main Index | Thread Index | Old Index