autoconf
[Top][All Lists]
Advanced

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

Re: marking a test in autotest as expected to fail


From: Eric Blake
Subject: Re: marking a test in autotest as expected to fail
Date: Tue, 10 Feb 2009 05:58:43 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Rikki McQueary on 2/9/2009 3:20 PM:

Hello Rikki,

[note that by using "-- " as the start of your message, that your entire
mail appears as if it were your signature line, and was stripped when I
hit reply in my mailer; I had to manually copy-and-paste your text before
I could reply.  In the future, please write the body of your message
before your signature]

> I have developed an autotest testsuite and within a list of tests I have
> 4 tests that are expected to fail.  I am using the following code to
> indicate the specific test that is expected to fail:
> AT_XFAIL_IF([AT_EXPR_RESPONSE_TEST_P][([test.1], ['"i,j&i<j"'],
> [test.1c]])

AT_EXPR_RESPONSE_TEST_P is not an autotest macro, which means you probably
wrote it.  If that is the case, please consider changing its name to use a
prefix of your own namespace, and leaving the AT_ namespace for official
autotest macros; that way, if autotest ever does add a macro by that name
in the future, you won't be faced with incompatible semantics.

Your quoting is imbalanced; you have more ( than ), and putting quotes
between AT_EXPR_RESPONSE_TEST_P and its arguments just looks weird.  Why
not write this as:

AT_XFAIL_IF([AT_EXPR_RESPONSE_TEST_P([test.1], ['"i,j&i<j"'], [test.1c])])

> 
> My question is: Is this correct?  And also in the output instead of the
> test passing with an ok is there a way to signify the test failed but
> was expected to fail?

Yes, other than the quoting, that is the correct way to mark a test as
conditionally failing.  And for an example output, the m4.git repository
has an xfail'd test where the output looks like:

  9: Renamesyms collisions       expected failure (macros.at:523)

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmRegMACgkQ84KuGfSFAYAZ0ACgzsjiL/xqL8ADTn87203TLCcU
kz4AoJ9CLW0Arfu0i28FiGr+IoPiJzbe
=ejVB
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]