tests: Support change_profile exec modes in mkprofile.pl

The gen_change_profile() function must be changed to allow the extra
condition in change_profiles rules.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
Tyler Hicks 2016-05-31 15:38:36 -05:00
parent b5d7154100
commit cb4b6115b4

View file

@ -345,6 +345,8 @@ sub gen_change_profile($) {
}
} elsif (@rules == 3) {
push (@{$output_rules{$hat}}, " change_profile $rules[1] -> $rules[2],\n",);
} elsif (@rules == 4) {
push (@{$output_rules{$hat}}, " change_profile $rules[1] $rules[2] -> $rules[3],\n",);
} else {
(!$nowarn) && print STDERR "Warning: invalid change_profile description '$rule', ignored\n";
}