mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-17 08:33:54 +00: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.
|
# TODO(fuchsia:46559): Fix the leaks and remove this.
|
||||||
deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-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) {
|
if (crashpad_is_in_fuchsia) {
|
||||||
|
@ -73,6 +73,8 @@ int main(int argc, char* argv[]) {
|
|||||||
// runner.
|
// runner.
|
||||||
const bool use_chromium_test_launcher =
|
const bool use_chromium_test_launcher =
|
||||||
!crashpad::test::WinChildProcess::IsChildProcess();
|
!crashpad::test::WinChildProcess::IsChildProcess();
|
||||||
|
#elif defined(OS_ANDROID)
|
||||||
|
constexpr bool use_chromium_test_launcher = false;
|
||||||
#else // OS_WIN
|
#else // OS_WIN
|
||||||
constexpr bool use_chromium_test_launcher = true;
|
constexpr bool use_chromium_test_launcher = true;
|
||||||
#endif // OS_WIN
|
#endif // OS_WIN
|
||||||
|
@ -69,10 +69,15 @@ base::FilePath TestDataRootInternal() {
|
|||||||
// out/{Debug,Release} relative to the Crashpad root.
|
// out/{Debug,Release} relative to the Crashpad root.
|
||||||
base::FilePath executable_path;
|
base::FilePath executable_path;
|
||||||
if (Paths::Executable(&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 candidate =
|
||||||
base::FilePath(executable_path.DirName()
|
base::FilePath(executable_path.DirName()
|
||||||
.Append(base::FilePath::kParentDirectory)
|
.Append(base::FilePath::kParentDirectory)
|
||||||
.Append(base::FilePath::kParentDirectory));
|
.Append(base::FilePath::kParentDirectory));
|
||||||
|
#endif
|
||||||
if (IsTestDataRoot(candidate)) {
|
if (IsTestDataRoot(candidate)) {
|
||||||
return candidate;
|
return candidate;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user