Blag

He's not dead, he's resting

Building but Not Running Tests with Automake

If you’re still stuck using autotools because Quagmire can’t yet do everything you need, you might find this little hack handy…

When making an API change that you know will break lots of your unit tests, it would be nice to have a ‘make check-programs-but-don’t-bother-running-them’ target. Automake doesn’t let you do this — to build check_PROGRAMS, you have to run them (and all the tests in SUBDIRS you already fixed) too. This can get annoying if you’re just wanting the compiler to point out the next place you have to change something. But you can cheat…

make check TESTS_ENVIRONMENT=true

One drawback: if you’re using XFAIL_TESTS, they’ll show up as incorrectly passing. If you don’t have many of these, you can disable them and still gain most of the benefits:

make check TESTS_ENVIRONMENT=true XFAIL_TESTS=
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s