minijail: Add a way to specify the path of libminijailpreload.so

This change will allow tests that use the minijail0 binary. In
particular, this is interesting because it's the only way that the
libminijailpreload.so can be used.

Bug: None
Test: make tests

Change-Id: I681b7cda65910c339f4a91a0af01ba7cec2c3742
diff --git a/minijail0_cli_unittest.cc b/minijail0_cli_unittest.cc
index 4ffe438..d5f3c98 100644
--- a/minijail0_cli_unittest.cc
+++ b/minijail0_cli_unittest.cc
@@ -36,8 +36,9 @@
   // We use a vector of strings rather than const char * pointers because we
   // need the backing memory to be writable.  The CLI might mutate the strings
   // as it parses things (which is normally permissible with argv).
-  int parse_args_(const std::vector<std::string>& argv, int *exit_immediately,
-                  ElfType *elftype) {
+  int parse_args_(const std::vector<std::string>& argv,
+                  int* exit_immediately,
+                  ElfType* elftype) {
     // Make sure we reset the getopts state when scanning a new argv.  Setting
     // this to 0 is a GNU extension, but AOSP/BSD also checks this (as an alias
     // to their "optreset").
@@ -55,9 +56,11 @@
     // We grab stdout from parse_args itself as it might dump things we don't
     // usually care about like help output.
     testing::internal::CaptureStdout();
-    int ret = parse_args(j, pargv.size(),
-                         const_cast<char* const*>(pargv.data()),
-                         exit_immediately, elftype);
+
+    const char* preload_path = PRELOADPATH;
+    int ret =
+        parse_args(j, pargv.size(), const_cast<char* const*>(pargv.data()),
+                   exit_immediately, elftype, &preload_path);
     testing::internal::GetCapturedStdout();
 
     minijail_destroy(j);