mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-27 07:14:10 +08:00
android: configure a native test suite
Most Android tests in Chromium's infrastructure are launched from an APK, but that's not appropriate for Crashpad where many things expect to be run in a plain executable. Bug: chromium:1050178 Change-Id: I6eeb3f5e4889193e5bbe2a3bad2cd99a18e970ba Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2112342 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
parent
2965013518
commit
af2be80bdb
24
BUILD.gn
24
BUILD.gn
@ -52,6 +52,30 @@ if (crashpad_is_in_chromium || crashpad_is_in_fuchsia) {
|
||||
# TODO(fuchsia:46559): Fix the leaks and remove this.
|
||||
deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ]
|
||||
}
|
||||
if (crashpad_is_android) {
|
||||
use_raw_android_executable = true
|
||||
|
||||
copy("crashpad_test_data") {
|
||||
testonly = true
|
||||
sources = [
|
||||
"test/test_paths_test_data_root.txt",
|
||||
"util/net/testdata/ascii_http_body.txt",
|
||||
"util/net/testdata/binary_http_body.dat",
|
||||
]
|
||||
|
||||
outputs = [
|
||||
"$root_out_dir/crashpad_test_data/{{source}}",
|
||||
]
|
||||
}
|
||||
|
||||
deps += [ ":crashpad_test_data" ]
|
||||
|
||||
extra_dist_files = [
|
||||
"$root_out_dir/crashpad_handler",
|
||||
"$root_out_dir/crashpad_test_test_multiprocess_exec_test_child",
|
||||
"$root_out_dir/crashpad_test_data",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
if (crashpad_is_in_fuchsia) {
|
||||
|
@ -73,6 +73,8 @@ int main(int argc, char* argv[]) {
|
||||
// runner.
|
||||
const bool use_chromium_test_launcher =
|
||||
!crashpad::test::WinChildProcess::IsChildProcess();
|
||||
#elif defined(OS_ANDROID)
|
||||
constexpr bool use_chromium_test_launcher = false;
|
||||
#else // OS_WIN
|
||||
constexpr bool use_chromium_test_launcher = true;
|
||||
#endif // OS_WIN
|
||||
|
@ -69,10 +69,15 @@ base::FilePath TestDataRootInternal() {
|
||||
// out/{Debug,Release} relative to the Crashpad root.
|
||||
base::FilePath executable_path;
|
||||
if (Paths::Executable(&executable_path)) {
|
||||
#if defined(OS_ANDROID)
|
||||
base::FilePath candidate = executable_path.DirName()
|
||||
.Append("crashpad_test_data");
|
||||
#else
|
||||
base::FilePath candidate =
|
||||
base::FilePath(executable_path.DirName()
|
||||
.Append(base::FilePath::kParentDirectory)
|
||||
.Append(base::FilePath::kParentDirectory));
|
||||
#endif
|
||||
if (IsTestDataRoot(candidate)) {
|
||||
return candidate;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user