CRAS: Modify unittests to use selinux stubs

selinux_restorecon() doesn't work while running unittests, because there
is no file_contexts file. So, we enclose that call in a wrapper
function, and then stub that function for unittests, so that the
unittests don't break.

BUG=b:68722835
TEST=Unit tests pass with and without selinux being enabled.

Change-Id: I36d7a6b94d628cc2ceadce4a3bf7e78d57cb2eb4
Reviewed-on: https://chromium-review.googlesource.com/871793
Commit-Ready: Prashant Malani <pmalani@google.com>
Tested-by: Prashant Malani <pmalani@google.com>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
5 files changed