From 6667fa25595a62c7a2fed51cf4a56df702e324ae Mon Sep 17 00:00:00 2001 From: Scott Graham Date: Thu, 15 Feb 2018 13:31:10 -0800 Subject: [PATCH] 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 Commit-Queue: Scott Graham --- test/test_paths.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/test_paths.cc b/test/test_paths.cc index f6471d08..0d7db061 100644 --- a/test/test_paths.cc +++ b/test/test_paths.cc @@ -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; }