[apparmor] [patch 16/26] Make dbus tests be conditionally run based on pkg-config

Seth Arnold seth.arnold at canonical.com
Fri Apr 18 02:44:27 UTC 2014


On Tue, Apr 15, 2014 at 10:22:23AM -0700, 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.
> 
> This patch contains the review fix from sbeattie
> 
> Signed-off-by: John Johansen <john.johansen at canonical.com>
> Acked-by: Steve Beattie <steve at nxnw.org>

Acked-by: Seth Arnold <seth.arnold at canonical.com>

Thanks

> 
> ---
>  tests/regression/apparmor/Makefile |   22 ++++++++++++++++------
>  1 file changed, 16 insertions(+), 6 deletions(-)
> 
> --- 2.9-test.orig/tests/regression/apparmor/Makefile
> +++ 2.9-test/tests/regression/apparmor/Makefile
> @@ -66,9 +66,6 @@
>      chown.c \
>      clone.c \
>      coredump.c \
> -    dbus_eavesdrop.c \
> -    dbus_message.c \
> -    dbus_service.c \
>      deleted.c \
>      environ.c \
>      env_check.c \
> @@ -125,6 +122,17 @@
>  SRC+=syscall_ioperm.c syscall_iopl.c
>  endif
>  
> +#only do dbus if proper libs are installl
> +ifneq (,$(shell pkg-config --exists dbus-1 && echo TRUE))
> +SRC+=dbus_eavesdrop.c dbus_message.c dbus_service.c
> +else
> +$(warning ${nl}\
> +************************************************************************${nl}\
> +No dbus pkg-config skipping dbus_eavesdrop dbus_message dbus_services tests ...${nl}\
> +Install libdbus-1-dev or equivalent package to build and run these tests${nl}\
> +************************************************************************${nl})
> +endif
> +
>  EXEC=$(SRC:%.c=%)
>  
>  TESTS=access \
> @@ -138,9 +146,6 @@
>        chdir \
>        clone \
>        coredump \
> -      dbus_eavesdrop \
> -      dbus_message \
> -      dbus_service \
>        deleted \
>        environ \
>        exec \
> @@ -179,6 +184,11 @@
>        xattrs\
>        longpath
>  
> +#only do dbus if proper libs are installl
> +ifneq (,$(shell pkg-config --exists dbus-1 && echo TRUE))
> +TESTS+=dbus_eavesdrop dbus_message dbus_service
> +endif
> +
>  # Tests that can crash the kernel should be placed here
>  RISKY_TESTS=
>  
> 
> 
> -- 
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140417/78377ecd/attachment.pgp>


More information about the AppArmor mailing list