[Issue#] N/A
[Feature/Bug] N/A
[Problem] security-server tests binaries are not present in allowed middleware
list. Because of that tests fail on rsa image.
[Cause] N/A
[Solution] Test binaries are added in postinstall
[Verification] Build and install test package on rsa image. Check
/usr/share/security-server/mw-list. Test binaries should be added to the list.
Install package again. There should be no duplicates. Run tests for
client-smack, label and server. Results should be identical to those from slp
image.
Change-Id: Idc66e54ffbe3a430ceff6602856863c1e27148eb
%post
find /etc/smack/test_privilege_control_DIR/ -type f -name exec -exec chmod 0755 {} +
+# add test binaries to mw-list if it's not already there
+BINARIES[0]="/usr/bin/security-server-tests-client-smack"
+BINARIES[1]="/usr/bin/security-server-tests-label"
+BINARIES[2]="/usr/bin/security-server-tests-server"
+for BINARY in "${BINARIES[@]}"
+do
+ grep -q $BINARY /usr/share/security-server/mw-list\
+ || echo $BINARY >> /usr/share/security-server/mw-list
+done
echo "security-tests postinst done ..."
%postun