[apparmor] [PATCH 2/3] tests: Allow for the subdomain uservar to be defined by an env variable

Tyler Hicks tyhicks at canonical.com
Sat Jan 11 00:58:07 UTC 2014


On 2014-01-10 18:50:46, Tyler Hicks wrote:
> The APPARMOR_PARSER environment variable can be used to set the
> subdomain shell variable, which points to the parser to be used for
> regression testing.
> 
> Signed-off-by: Tyler Hicks <tyhicks at canonical.com>
> ---

I don't like this patch, but I'm not sure how to best do this.

The tests/regression/apparmor/README calls the variables in uservars.inc
"environment variables" but that's not what they are. They're local
shell variables that we assign unconditionally in uservars.inc.

Tyler

>  tests/regression/apparmor/uservars.inc | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tests/regression/apparmor/uservars.inc b/tests/regression/apparmor/uservars.inc
> index a8647dc..51ccb4e 100644
> --- a/tests/regression/apparmor/uservars.inc
> +++ b/tests/regression/apparmor/uservars.inc
> @@ -1,6 +1,9 @@
>  # 1. Path to apparmor parser
>  subdomain=../../../parser/apparmor_parser
>  #subdomain=/sbin/apparmor_parser
> +if [ -n "$APPARMOR_PARSER" ]; then
> +	subdomain="$APPARMOR_PARSER"
> +fi
>  
>  # 2. additional arguments to the apparmor parser
>  parser_args="-q -K"
> -- 
> 1.8.3.2
> 
> 
> -- 
> 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: 836 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140110/110dfa4e/attachment.pgp>


More information about the AppArmor mailing list