mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
mac/arm64: recognize “Apple M1” as a valid CPU vendor
The DTK reported “Apple processor” in this spot, but shipping hardware now seems to use “Apple M1”. The DTK is no longer relevant, but for some degree of future-proofing, look for “Apple ” as prefix in the test. Test: snapshot_test SystemSnapshotMacTest.CPUVendor Bug: chromium:1222625 Change-Id: I6ead87ebe9aa078ef9a95e5bcc6a9e5ca8c3b55a Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2976787 Reviewed-by: Nico Weber <thakis@chromium.org> Commit-Queue: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
cbec52f327
commit
883a64e8ee
2
BUILD.gn
2
BUILD.gn
@ -152,7 +152,7 @@ if (crashpad_is_in_chromium || crashpad_is_in_fuchsia) {
|
|||||||
test("crashpad_snapshot_test") {
|
test("crashpad_snapshot_test") {
|
||||||
deps = [
|
deps = [
|
||||||
"snapshot:snapshot_test",
|
"snapshot:snapshot_test",
|
||||||
"test:googletest_main",
|
"test:googlemock_main",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -433,6 +433,7 @@ source_set("snapshot_test") {
|
|||||||
"../compat",
|
"../compat",
|
||||||
"../minidump:format",
|
"../minidump:format",
|
||||||
"../test",
|
"../test",
|
||||||
|
"../third_party/googletest:googlemock",
|
||||||
"../third_party/googletest:googletest",
|
"../third_party/googletest:googletest",
|
||||||
"../third_party/mini_chromium:base",
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "build/build_config.h"
|
#include "build/build_config.h"
|
||||||
|
#include "gmock/gmock.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
#include "snapshot/mac/process_reader_mac.h"
|
#include "snapshot/mac/process_reader_mac.h"
|
||||||
#include "test/errors.h"
|
#include "test/errors.h"
|
||||||
@ -90,7 +91,7 @@ TEST_F(SystemSnapshotMacTest, CPUVendor) {
|
|||||||
FAIL() << "cpu_vendor " << cpu_vendor;
|
FAIL() << "cpu_vendor " << cpu_vendor;
|
||||||
}
|
}
|
||||||
#elif defined(ARCH_CPU_ARM64)
|
#elif defined(ARCH_CPU_ARM64)
|
||||||
EXPECT_EQ(cpu_vendor, "Apple processor");
|
EXPECT_THAT(cpu_vendor, testing::StartsWith("Apple "));
|
||||||
#else
|
#else
|
||||||
#error port to your architecture
|
#error port to your architecture
|
||||||
#endif
|
#endif
|
||||||
|
@ -59,8 +59,9 @@
|
|||||||
'snapshot.gyp:crashpad_snapshot',
|
'snapshot.gyp:crashpad_snapshot',
|
||||||
'../client/client.gyp:crashpad_client',
|
'../client/client.gyp:crashpad_client',
|
||||||
'../compat/compat.gyp:crashpad_compat',
|
'../compat/compat.gyp:crashpad_compat',
|
||||||
'../test/test.gyp:crashpad_googletest_main',
|
'../test/test.gyp:crashpad_googlemock_main',
|
||||||
'../test/test.gyp:crashpad_test',
|
'../test/test.gyp:crashpad_test',
|
||||||
|
'../third_party/googletest/googlemock.gyp:googlemock',
|
||||||
'../third_party/googletest/googletest.gyp:googletest',
|
'../third_party/googletest/googletest.gyp:googletest',
|
||||||
'../third_party/mini_chromium/mini_chromium.gyp:base',
|
'../third_party/mini_chromium/mini_chromium.gyp:base',
|
||||||
'../util/util.gyp:crashpad_util',
|
'../util/util.gyp:crashpad_util',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user