ATF-devel archive

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

Re: Conditional tests based on ${MACHINE} and ${MACHINE_ARCH}



On Sat, 1 Jan 2011, Julio Merino wrote:

On Sat, Jan 1, 2011 at 3:50 PM, Paul Goyette <paul%whooppee.com@localhost> 
wrote:
There's atf_arch and atf_machine (and these are the opposite of MACHINE
and MACHINE_ARCH for some gnuy reason).  Do the aieeefp tests compile
on vax or do you need some intra-tp ifdef games instead?

Ah, ok.  So atf_arch contains ${MACHINE} and atf_machine contains
${MACHINE_ARCH} ?  Kewl.

Yes, they are reversed for some stupid historical reason (autoconf
internal variables not matching common sense, iirc).  That ought to be
fixed eventually... let's see if I can do that soon (filed PR
bin/44305 to track this).

You can define the "require.arch" and "require.machine" properties on
a test case basis; these contain a whitespace separated list of all
allowed architectures and machines for a particular test case.
atf-run will automatically skip these test cases if the host machine
does not match the requirements.  See atf-test-case(4) for details on
other require.* properties.

Seems to me it would also be useful to have the inverse tests?

require.not.{arch,machine} could skip the tests if any of the the listed entries match?

Seems that it would be much more likely to have one or two "skip test" architectures than having a small list of "run test", so maintenance would be simpler.


-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index