Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: breakpad/BUILD.gn

Issue 1854233002: Reland 2 of GN: Make breakpad_unittests & sandbox_linux_unittests use test() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test-minor-renames
Patch Set: Fix PIE errors, fix component mode. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « BUILD.gn ('k') | breakpad/breakpad.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/symlink.gni") 5 import("//build/symlink.gni")
6 import("//testing/test.gni") 6 import("//testing/test.gni")
7 7
8 if (is_android) { 8 if (is_android) {
9 import("//build/config/android/rules.gni") 9 import("//build/config/android/rules.gni")
10 } 10 }
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 "src/client", 616 "src/client",
617 "src/third_party/linux/include", 617 "src/third_party/linux/include",
618 ".", 618 ".",
619 ] 619 ]
620 620
621 # There are some warnings in this code. 621 # There are some warnings in this code.
622 configs -= [ "//build/config/compiler:chromium_code" ] 622 configs -= [ "//build/config/compiler:chromium_code" ]
623 configs += [ "//build/config/compiler:no_chromium_code" ] 623 configs += [ "//build/config/compiler:no_chromium_code" ]
624 } 624 }
625 625
626 # "breakpad_unittests" cannot use the test() template because the test is run 626 test("breakpad_unittests") {
627 # as an executable not as an APK on Android.
628 executable("breakpad_unittests") {
629 testonly = true
630 set_sources_assignment_filter([]) 627 set_sources_assignment_filter([])
631 sources = [ 628 sources = [
632 "linux/breakpad_googletest_includes.h", 629 "linux/breakpad_googletest_includes.h",
633 "src/client/linux/handler/exception_handler_unittest.cc", 630 "src/client/linux/handler/exception_handler_unittest.cc",
634 "src/client/linux/minidump_writer/cpu_set_unittest.cc", 631 "src/client/linux/minidump_writer/cpu_set_unittest.cc",
635 "src/client/linux/minidump_writer/directory_reader_unittest.cc", 632 "src/client/linux/minidump_writer/directory_reader_unittest.cc",
636 "src/client/linux/minidump_writer/line_reader_unittest.cc", 633 "src/client/linux/minidump_writer/line_reader_unittest.cc",
637 "src/client/linux/minidump_writer/linux_core_dumper_unittest.cc", 634 "src/client/linux/minidump_writer/linux_core_dumper_unittest.cc",
638 "src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc", 635 "src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc",
639 "src/client/linux/minidump_writer/minidump_writer_unittest.cc", 636 "src/client/linux/minidump_writer/minidump_writer_unittest.cc",
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 # There are some warnings in this code. 672 # There are some warnings in this code.
676 configs -= [ "//build/config/compiler:chromium_code" ] 673 configs -= [ "//build/config/compiler:chromium_code" ]
677 configs += [ "//build/config/compiler:no_chromium_code" ] 674 configs += [ "//build/config/compiler:no_chromium_code" ]
678 675
679 if (is_clang) { 676 if (is_clang) {
680 # See http://crbug.com/138571#c18 677 # See http://crbug.com/138571#c18
681 cflags = [ "-Wno-unused-value" ] 678 cflags = [ "-Wno-unused-value" ]
682 } 679 }
683 680
684 if (is_android) { 681 if (is_android) {
682 use_raw_android_executable = true
685 sources += [ "src/common/android/breakpad_getcontext_unittest.cc" ] 683 sources += [ "src/common/android/breakpad_getcontext_unittest.cc" ]
686 libs = [ "log" ] 684 libs = [ "log" ]
687 include_dirs += [ "src/common/android/include" ] 685 include_dirs += [ "src/common/android/include" ]
686 extra_dist_files = [ "$root_out_dir/linux_dumper_unittest_helper" ]
688 } 687 }
689 688
690 # Clang's -mstackrealign doesn't work well with 689 # Clang's -mstackrealign doesn't work well with
691 # linux_syscall_support.h hand written asm syscalls. 690 # linux_syscall_support.h hand written asm syscalls.
692 # See https://crbug.com/556393 691 # See https://crbug.com/556393
693 configs -= [ "//build/config/compiler:clang_stackrealign" ] 692 configs -= [ "//build/config/compiler:clang_stackrealign" ]
694 } 693 }
695 694
696 executable("linux_dumper_unittest_helper") { 695 executable("linux_dumper_unittest_helper") {
697 set_sources_assignment_filter([]) 696 set_sources_assignment_filter([])
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 "src/client/windows/sender/crash_report_sender.h", 876 "src/client/windows/sender/crash_report_sender.h",
878 "src/common/windows/http_upload.cc", 877 "src/common/windows/http_upload.cc",
879 "src/common/windows/http_upload.h", 878 "src/common/windows/http_upload.h",
880 ] 879 ]
881 configs += [ ":sender_config" ] 880 configs += [ ":sender_config" ]
882 public_configs = [ ":sender_config" ] 881 public_configs = [ ":sender_config" ]
883 } 882 }
884 } 883 }
885 884
886 if (is_android) { 885 if (is_android) {
887 create_native_executable_dist("breakpad_unittests_deps") {
888 testonly = true
889 dist_dir = "$root_out_dir/breakpad_unittests_deps"
890 binary = "$root_out_dir/breakpad_unittests"
891 deps = [
892 ":breakpad_unittests",
893 ]
894
895 if (is_component_build) {
896 deps += [ "//build/android:cpplib_stripped" ]
897 }
898 }
899
900 test_runner_script("breakpad_unittests__test_runner_script") {
901 test_name = "breakpad_unittests"
902 test_type = "gtest"
903 test_suite = "breakpad_unittests"
904 isolate_file = "breakpad_unittests.isolate"
905 }
906
907 # TODO(GYP) Delete this after we've converted everything to GN. 886 # TODO(GYP) Delete this after we've converted everything to GN.
908 # The _run targets exist only for compatibility w/ GYP. 887 group("breakpad_unittests_deps") {
909 group("breakpad_unittests_apk_run") {
910 testonly = true 888 testonly = true
911 deps = [ 889 deps = [
912 ":breakpad_unittests", 890 ":breakpad_unittests",
913 ] 891 ]
914 } 892 }
915 } 893 }
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | breakpad/breakpad.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698