[apparmor] [patch 23/24] Make dbus tests be conditionally run based on pkg-config [v2]

Steve Beattie steve at nxnw.org
Tue Mar 11 17:08:17 UTC 2014


On Fri, Mar 07, 2014 at 09:31:44AM -0800, john.johansen at canonical.com wrote:
> The addition of the dbus tests requires dbus dev libraries be installed
> to run the test suite. This is not always desirable or even possible.
> 
> So make building and running the dbus tests conditional on the
> pkg-config info from those libs. If they are not present output a
> message about skipping the tests.

I'm okay with this idea; however, the pkg-config command wasn't actually
being run, so no matter what, the dbus tests were getting skipped.
Secondly, asking pkg-config for settings for a package that isn't
installed, the error emitted goes to stderr, e.g.:

  Package dbus-1 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `dbus-1.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'dbus-1' found
  No dbus pkg-config skipping dbus_eavesdrop dbus_message dbus_services tests ...

which feels ugly to me, though (thirdly) I would like to see the
warning message when dbus devel information cannot be found be more
prominent.

Anyway, attached is an updated patch which addresses the first two
issues (but didn't address the prominence of the warning message).

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jj-tests-cond-dbus.patch
Type: text/x-diff
Size: 1903 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140311/c1624f50/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140311/c1624f50/attachment.pgp>


More information about the AppArmor mailing list