fuchsia: Fixes to TestPaths

- Don't specify a directory in .so load, this allows
  CrashpadInfoClientOptions.TwoModules to pass, as it is able to find
  its .so.
- Set expected exe name to "app" on Fuchsia, as that's what all binaries
  are called when packaged. This fixes Paths.Executable.

Bug: crashpad:196
Change-Id: I6b0a663734e93b76412a5bdba045e73dcfe7e4cf
Reviewed-on: https://chromium-review.googlesource.com/922871
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
This commit is contained in:
Scott Graham 2018-02-15 13:31:10 -08:00 committed by Commit Bot
parent b43858c990
commit 6667fa2559

View File

@ -127,6 +127,10 @@ base::FilePath TestPaths::Executable() {
// static
base::FilePath TestPaths::ExpectedExecutableBasename(
const base::FilePath::StringType& name) {
#if defined(OS_FUCHSIA)
// Apps in Fuchsia packages are always named "app".
return base::FilePath("app");
#else // OS_FUCHSIA
#if defined(CRASHPAD_IS_IN_CHROMIUM)
base::FilePath::StringType executable_name(
FILE_PATH_LITERAL("crashpad_tests"));
@ -139,6 +143,7 @@ base::FilePath TestPaths::ExpectedExecutableBasename(
#endif // OS_WIN
return base::FilePath(executable_name);
#endif // OS_FUCHSIA
}
// static
@ -195,7 +200,11 @@ base::FilePath TestPaths::BuildArtifact(
#endif // OS_WIN
#if defined(OS_FUCHSIA)
directory = base::FilePath(FILE_PATH_LITERAL("/pkg/lib"));
// TODO(scottmg): .so files are currently deployed into /boot/lib, where
// they'll be found (without a path) by the loader. Application packaging
// infrastructure is in progress, so this will likely change again in the
// future.
directory = base::FilePath();
#endif
break;
}