diff --git a/build/run_tests.py b/build/run_tests.py index 8491311d..1f4a089a 100755 --- a/build/run_tests.py +++ b/build/run_tests.py @@ -47,6 +47,7 @@ def main(args): 'crashpad_client_test', 'crashpad_minidump_test', 'crashpad_snapshot_test', + 'crashpad_test_test', 'crashpad_util_test', ] for test in tests: diff --git a/client/client_test.gyp b/client/client_test.gyp index 67d24318..71341620 100644 --- a/client/client_test.gyp +++ b/client/client_test.gyp @@ -23,11 +23,11 @@ 'dependencies': [ 'client.gyp:crashpad_client', '../compat/compat.gyp:crashpad_compat', + '../test/test.gyp:crashpad_test', '../third_party/gtest/gtest.gyp:gtest', '../third_party/gtest/gtest.gyp:gtest_main', '../third_party/mini_chromium/mini_chromium.gyp:base', '../util/util.gyp:crashpad_util', - '../util/util_test.gyp:crashpad_util_test_lib', ], 'include_dirs': [ '..', diff --git a/client/crash_report_database_test.cc b/client/crash_report_database_test.cc index f065dd69..6a04d19c 100644 --- a/client/crash_report_database_test.cc +++ b/client/crash_report_database_test.cc @@ -19,9 +19,9 @@ #include "build/build_config.h" #include "client/settings.h" #include "gtest/gtest.h" +#include "test/errors.h" +#include "test/scoped_temp_dir.h" #include "util/file/file_io.h" -#include "util/test/errors.h" -#include "util/test/scoped_temp_dir.h" namespace crashpad { namespace test { diff --git a/client/settings_test.cc b/client/settings_test.cc index 6ff6197f..7ce8fa23 100644 --- a/client/settings_test.cc +++ b/client/settings_test.cc @@ -15,8 +15,8 @@ #include "client/settings.h" #include "gtest/gtest.h" +#include "test/scoped_temp_dir.h" #include "util/file/file_io.h" -#include "util/test/scoped_temp_dir.h" namespace crashpad { namespace test { diff --git a/client/simple_string_dictionary_test.cc b/client/simple_string_dictionary_test.cc index 26a918bc..f1e34013 100644 --- a/client/simple_string_dictionary_test.cc +++ b/client/simple_string_dictionary_test.cc @@ -16,7 +16,7 @@ #include "base/logging.h" #include "gtest/gtest.h" -#include "util/test/gtest_death_check.h" +#include "test/gtest_death_check.h" namespace crashpad { namespace test { diff --git a/client/simulate_crash_mac_test.cc b/client/simulate_crash_mac_test.cc index 0fd08fc1..1ef0a775 100644 --- a/client/simulate_crash_mac_test.cc +++ b/client/simulate_crash_mac_test.cc @@ -21,6 +21,8 @@ #include "base/strings/stringprintf.h" #include "build/build_config.h" #include "gtest/gtest.h" +#include "test/mac/mach_errors.h" +#include "test/mac/mach_multiprocess.h" #include "util/mach/exc_server_variants.h" #include "util/mach/exception_behaviors.h" #include "util/mach/exception_ports.h" @@ -28,8 +30,6 @@ #include "util/mach/mach_message.h" #include "util/mach/mach_message_server.h" #include "util/mach/symbolic_constants_mach.h" -#include "util/test/mac/mach_errors.h" -#include "util/test/mac/mach_multiprocess.h" namespace crashpad { namespace test { diff --git a/crashpad.gyp b/crashpad.gyp index 3291e7a4..04b4d778 100644 --- a/crashpad.gyp +++ b/crashpad.gyp @@ -27,6 +27,8 @@ 'minidump/minidump_test.gyp:*', 'snapshot/snapshot.gyp:*', 'snapshot/snapshot_test.gyp:*', + 'test/test.gyp:*', + 'test/test_test.gyp:*', 'tools/tools.gyp:*', 'util/util.gyp:*', 'util/util_test.gyp:*', diff --git a/minidump/minidump_exception_writer_test.cc b/minidump/minidump_exception_writer_test.cc index c8adeb43..881c36eb 100644 --- a/minidump/minidump_exception_writer_test.cc +++ b/minidump/minidump_exception_writer_test.cc @@ -33,8 +33,8 @@ #include "minidump/test/minidump_writable_test_util.h" #include "snapshot/test/test_cpu_context.h" #include "snapshot/test/test_exception_snapshot.h" +#include "test/gtest_death_check.h" #include "util/file/string_file.h" -#include "util/test/gtest_death_check.h" namespace crashpad { namespace test { diff --git a/minidump/minidump_file_writer_test.cc b/minidump/minidump_file_writer_test.cc index 89eb8051..cc6b1ce5 100644 --- a/minidump/minidump_file_writer_test.cc +++ b/minidump/minidump_file_writer_test.cc @@ -32,8 +32,8 @@ #include "snapshot/test/test_process_snapshot.h" #include "snapshot/test/test_system_snapshot.h" #include "snapshot/test/test_thread_snapshot.h" +#include "test/gtest_death_check.h" #include "util/file/string_file.h" -#include "util/test/gtest_death_check.h" namespace crashpad { namespace test { diff --git a/minidump/minidump_module_writer_test.cc b/minidump/minidump_module_writer_test.cc index 8087e36b..ab2ff20d 100644 --- a/minidump/minidump_module_writer_test.cc +++ b/minidump/minidump_module_writer_test.cc @@ -30,10 +30,10 @@ #include "minidump/test/minidump_string_writer_test_util.h" #include "minidump/test/minidump_writable_test_util.h" #include "snapshot/test/test_module_snapshot.h" +#include "test/gtest_death_check.h" #include "util/file/string_file.h" #include "util/misc/uuid.h" #include "util/stdlib/pointer_container.h" -#include "util/test/gtest_death_check.h" namespace crashpad { namespace test { diff --git a/minidump/minidump_system_info_writer_test.cc b/minidump/minidump_system_info_writer_test.cc index 2ad7d7ea..daf81f60 100644 --- a/minidump/minidump_system_info_writer_test.cc +++ b/minidump/minidump_system_info_writer_test.cc @@ -29,8 +29,8 @@ #include "minidump/test/minidump_string_writer_test_util.h" #include "minidump/test/minidump_writable_test_util.h" #include "snapshot/test/test_system_snapshot.h" +#include "test/gtest_death_check.h" #include "util/file/string_file.h" -#include "util/test/gtest_death_check.h" namespace crashpad { namespace test { diff --git a/minidump/minidump_test.gyp b/minidump/minidump_test.gyp index ef3efe1c..35b7d1a9 100644 --- a/minidump/minidump_test.gyp +++ b/minidump/minidump_test.gyp @@ -23,11 +23,11 @@ 'dependencies': [ 'minidump.gyp:crashpad_minidump', '../snapshot/snapshot_test.gyp:crashpad_snapshot_test_lib', + '../test/test.gyp:crashpad_test', '../third_party/gtest/gtest.gyp:gtest', '../third_party/gtest/gtest.gyp:gtest_main', '../third_party/mini_chromium/mini_chromium.gyp:base', '../util/util.gyp:crashpad_util', - '../util/util_test.gyp:crashpad_util_test', ], 'include_dirs': [ '..', diff --git a/minidump/minidump_thread_writer_test.cc b/minidump/minidump_thread_writer_test.cc index 94ec200a..76087a37 100644 --- a/minidump/minidump_thread_writer_test.cc +++ b/minidump/minidump_thread_writer_test.cc @@ -33,8 +33,8 @@ #include "snapshot/test/test_cpu_context.h" #include "snapshot/test/test_memory_snapshot.h" #include "snapshot/test/test_thread_snapshot.h" +#include "test/gtest_death_check.h" #include "util/file/string_file.h" -#include "util/test/gtest_death_check.h" namespace crashpad { namespace test { diff --git a/snapshot/mac/crashpad_info_client_options_test.cc b/snapshot/mac/crashpad_info_client_options_test.cc index c5f4fb48..3b7e2f23 100644 --- a/snapshot/mac/crashpad_info_client_options_test.cc +++ b/snapshot/mac/crashpad_info_client_options_test.cc @@ -20,7 +20,7 @@ #include "client/crashpad_info.h" #include "gtest/gtest.h" #include "snapshot/mac/process_snapshot_mac.h" -#include "util/test/paths.h" +#include "test/paths.h" namespace crashpad { namespace test { diff --git a/snapshot/mac/mach_o_image_annotations_reader_test.cc b/snapshot/mac/mach_o_image_annotations_reader_test.cc index 7006604a..50ba56f9 100644 --- a/snapshot/mac/mach_o_image_annotations_reader_test.cc +++ b/snapshot/mac/mach_o_image_annotations_reader_test.cc @@ -30,15 +30,15 @@ #include "client/simple_string_dictionary.h" #include "gtest/gtest.h" #include "snapshot/mac/process_reader.h" +#include "test/errors.h" +#include "test/mac/mach_errors.h" +#include "test/mac/mach_multiprocess.h" #include "util/file/file_io.h" #include "util/mac/mac_util.h" #include "util/mach/exc_server_variants.h" #include "util/mach/exception_ports.h" #include "util/mach/mach_message.h" #include "util/mach/mach_message_server.h" -#include "util/test/errors.h" -#include "util/test/mac/mach_errors.h" -#include "util/test/mac/mach_multiprocess.h" namespace crashpad { namespace test { diff --git a/snapshot/mac/mach_o_image_reader_test.cc b/snapshot/mac/mach_o_image_reader_test.cc index afbf5798..79329096 100644 --- a/snapshot/mac/mach_o_image_reader_test.cc +++ b/snapshot/mac/mach_o_image_reader_test.cc @@ -31,8 +31,8 @@ #include "snapshot/mac/mach_o_image_segment_reader.h" #include "snapshot/mac/process_reader.h" #include "snapshot/mac/process_types.h" +#include "test/mac/dyld.h" #include "util/misc/uuid.h" -#include "util/test/mac/dyld.h" // This file is responsible for testing MachOImageReader, // MachOImageSegmentReader, and MachOImageSymbolTableReader. diff --git a/snapshot/mac/process_reader_test.cc b/snapshot/mac/process_reader_test.cc index 2c0520be..25160d10 100644 --- a/snapshot/mac/process_reader_test.cc +++ b/snapshot/mac/process_reader_test.cc @@ -33,15 +33,15 @@ #include "build/build_config.h" #include "gtest/gtest.h" #include "snapshot/mac/mach_o_image_reader.h" +#include "test/errors.h" +#include "test/mac/dyld.h" +#include "test/mac/mach_errors.h" +#include "test/mac/mach_multiprocess.h" #include "util/file/file_io.h" #include "util/mac/mac_util.h" #include "util/mach/mach_extensions.h" #include "util/stdlib/pointer_container.h" #include "util/synchronization/semaphore.h" -#include "util/test/errors.h" -#include "util/test/mac/dyld.h" -#include "util/test/mac/mach_errors.h" -#include "util/test/mac/mach_multiprocess.h" namespace crashpad { namespace test { diff --git a/snapshot/mac/process_types_test.cc b/snapshot/mac/process_types_test.cc index 8c6582cb..b0fe5c65 100644 --- a/snapshot/mac/process_types_test.cc +++ b/snapshot/mac/process_types_test.cc @@ -23,8 +23,8 @@ #include "base/basictypes.h" #include "base/strings/stringprintf.h" #include "gtest/gtest.h" +#include "test/mac/dyld.h" #include "util/mac/mac_util.h" -#include "util/test/mac/dyld.h" namespace crashpad { namespace test { diff --git a/snapshot/mac/system_snapshot_mac_test.cc b/snapshot/mac/system_snapshot_mac_test.cc index b69ccac2..a02e94e0 100644 --- a/snapshot/mac/system_snapshot_mac_test.cc +++ b/snapshot/mac/system_snapshot_mac_test.cc @@ -22,8 +22,8 @@ #include "build/build_config.h" #include "gtest/gtest.h" #include "snapshot/mac/process_reader.h" +#include "test/errors.h" #include "util/mac/mac_util.h" -#include "util/test/errors.h" namespace crashpad { namespace test { diff --git a/snapshot/snapshot_test.gyp b/snapshot/snapshot_test.gyp index 27c4f62b..974bc760 100644 --- a/snapshot/snapshot_test.gyp +++ b/snapshot/snapshot_test.gyp @@ -53,11 +53,11 @@ 'snapshot.gyp:crashpad_snapshot', '../client/client.gyp:crashpad_client', '../compat/compat.gyp:crashpad_compat', + '../test/test.gyp:crashpad_test', '../third_party/gtest/gtest.gyp:gtest', '../third_party/gtest/gtest.gyp:gtest_main', '../third_party/mini_chromium/mini_chromium.gyp:base', '../util/util.gyp:crashpad_util', - '../util/util_test.gyp:crashpad_util_test_lib', ], 'include_dirs': [ '..', diff --git a/util/test/errors.cc b/test/errors.cc similarity index 98% rename from util/test/errors.cc rename to test/errors.cc index 757062c5..82376309 100644 --- a/util/test/errors.cc +++ b/test/errors.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/test/errors.h" +#include "test/errors.h" #include diff --git a/util/test/errors.h b/test/errors.h similarity index 96% rename from util/test/errors.h rename to test/errors.h index c1d79bf9..17b0bea6 100644 --- a/util/test/errors.h +++ b/test/errors.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CRASHPAD_UTIL_TEST_ERRORS_H_ -#define CRASHPAD_UTIL_TEST_ERRORS_H_ +#ifndef CRASHPAD_TEST_ERRORS_H_ +#define CRASHPAD_TEST_ERRORS_H_ #include @@ -79,4 +79,4 @@ std::string ErrorMessage(const std::string& base = std::string()); } // namespace test } // namespace crashpad -#endif // CRASHPAD_UTIL_TEST_ERRORS_H_ +#endif // CRASHPAD_TEST_ERRORS_H_ diff --git a/util/test/gtest_death_check.h b/test/gtest_death_check.h similarity index 93% rename from util/test/gtest_death_check.h rename to test/gtest_death_check.h index b3900b8b..8af50aac 100644 --- a/util/test/gtest_death_check.h +++ b/test/gtest_death_check.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CRASHPAD_UTIL_TEST_GTEST_DEATH_CHECK_H_ -#define CRASHPAD_UTIL_TEST_GTEST_DEATH_CHECK_H_ +#ifndef CRASHPAD_TEST_GTEST_DEATH_CHECK_H_ +#define CRASHPAD_TEST_GTEST_DEATH_CHECK_H_ #include "base/logging.h" #include "gtest/gtest.h" @@ -52,4 +52,4 @@ #endif -#endif // CRASHPAD_UTIL_TEST_GTEST_DEATH_CHECK_H_ +#endif // CRASHPAD_TEST_GTEST_DEATH_CHECK_H_ diff --git a/util/test/mac/dyld.h b/test/mac/dyld.h similarity index 88% rename from util/test/mac/dyld.h rename to test/mac/dyld.h index 068e8deb..e436c5d1 100644 --- a/util/test/mac/dyld.h +++ b/test/mac/dyld.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CRASHPAD_UTIL_TEST_MAC_DYLD_H_ -#define CRASHPAD_UTIL_TEST_MAC_DYLD_H_ +#ifndef CRASHPAD_TEST_MAC_DYLD_H_ +#define CRASHPAD_TEST_MAC_DYLD_H_ #include @@ -26,4 +26,4 @@ const struct dyld_all_image_infos* _dyld_get_all_image_infos(); } // extern "C" -#endif // CRASHPAD_UTIL_TEST_MAC_DYLD_H_ +#endif // CRASHPAD_TEST_MAC_DYLD_H_ diff --git a/util/test/mac/mach_errors.cc b/test/mac/mach_errors.cc similarity index 98% rename from util/test/mac/mach_errors.cc rename to test/mac/mach_errors.cc index 54fd6072..aef069b4 100644 --- a/util/test/mac/mach_errors.cc +++ b/test/mac/mach_errors.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/test/mac/mach_errors.h" +#include "test/mac/mach_errors.h" #include diff --git a/util/test/mac/mach_errors.h b/test/mac/mach_errors.h similarity index 95% rename from util/test/mac/mach_errors.h rename to test/mac/mach_errors.h index 2b1fd853..2283ae77 100644 --- a/util/test/mac/mach_errors.h +++ b/test/mac/mach_errors.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CRASHPAD_UTIL_TEST_MAC_MACH_ERRORS_H_ -#define CRASHPAD_UTIL_TEST_MAC_MACH_ERRORS_H_ +#ifndef CRASHPAD_TEST_MAC_MACH_ERRORS_H_ +#define CRASHPAD_TEST_MAC_MACH_ERRORS_H_ #include @@ -67,4 +67,4 @@ std::string BootstrapErrorMessage(kern_return_t bootstrap_err, } // namespace test } // namespace crashpad -#endif // CRASHPAD_UTIL_TEST_MAC_MACH_ERRORS_H_ +#endif // CRASHPAD_TEST_MAC_MACH_ERRORS_H_ diff --git a/util/test/mac/mach_multiprocess.cc b/test/mac/mach_multiprocess.cc similarity index 98% rename from util/test/mac/mach_multiprocess.cc rename to test/mac/mach_multiprocess.cc index c558eb05..6d68d23c 100644 --- a/util/test/mac/mach_multiprocess.cc +++ b/test/mac/mach_multiprocess.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/test/mac/mach_multiprocess.h" +#include "test/mac/mach_multiprocess.h" #include #include @@ -26,12 +26,12 @@ #include "base/memory/scoped_ptr.h" #include "base/rand_util.h" #include "gtest/gtest.h" +#include "test/errors.h" +#include "test/mac/mach_errors.h" #include "util/file/file_io.h" #include "util/mach/mach_extensions.h" #include "util/mach/mach_message.h" #include "util/misc/scoped_forbid_return.h" -#include "util/test/errors.h" -#include "util/test/mac/mach_errors.h" namespace { diff --git a/util/test/mac/mach_multiprocess.h b/test/mac/mach_multiprocess.h similarity index 95% rename from util/test/mac/mach_multiprocess.h rename to test/mac/mach_multiprocess.h index 85139d56..18324d42 100644 --- a/util/test/mac/mach_multiprocess.h +++ b/test/mac/mach_multiprocess.h @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CRASHPAD_UTIL_TEST_MAC_MACH_MULTIPROCESS_H_ -#define CRASHPAD_UTIL_TEST_MAC_MACH_MULTIPROCESS_H_ +#ifndef CRASHPAD_TEST_MAC_MACH_MULTIPROCESS_H_ +#define CRASHPAD_TEST_MAC_MACH_MULTIPROCESS_H_ #include #include #include "base/basictypes.h" -#include "util/test/multiprocess.h" +#include "test/multiprocess.h" namespace crashpad { namespace test { @@ -117,4 +117,4 @@ class MachMultiprocess : public Multiprocess { } // namespace test } // namespace crashpad -#endif // CRASHPAD_UTIL_TEST_MAC_MACH_MULTIPROCESS_H_ +#endif // CRASHPAD_TEST_MAC_MACH_MULTIPROCESS_H_ diff --git a/util/test/mac/mach_multiprocess_test.cc b/test/mac/mach_multiprocess_test.cc similarity index 96% rename from util/test/mac/mach_multiprocess_test.cc rename to test/mac/mach_multiprocess_test.cc index dc9f7e97..858821f7 100644 --- a/util/test/mac/mach_multiprocess_test.cc +++ b/test/mac/mach_multiprocess_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/test/mac/mach_multiprocess.h" +#include "test/mac/mach_multiprocess.h" #include diff --git a/util/test/multiprocess.h b/test/multiprocess.h similarity index 98% rename from util/test/multiprocess.h rename to test/multiprocess.h index 0672b7aa..bbfbca31 100644 --- a/util/test/multiprocess.h +++ b/test/multiprocess.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CRASHPAD_UTIL_TEST_MULTIPROCESS_H_ -#define CRASHPAD_UTIL_TEST_MULTIPROCESS_H_ +#ifndef CRASHPAD_TEST_MULTIPROCESS_H_ +#define CRASHPAD_TEST_MULTIPROCESS_H_ #include @@ -203,4 +203,4 @@ class Multiprocess { } // namespace test } // namespace crashpad -#endif // CRASHPAD_UTIL_TEST_MULTIPROCESS_H_ +#endif // CRASHPAD_TEST_MULTIPROCESS_H_ diff --git a/util/test/multiprocess_exec.h b/test/multiprocess_exec.h similarity index 92% rename from util/test/multiprocess_exec.h rename to test/multiprocess_exec.h index 4f60f814..2d8f3389 100644 --- a/util/test/multiprocess_exec.h +++ b/test/multiprocess_exec.h @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CRASHPAD_UTIL_TEST_MULTIPROCESS_EXEC_H_ -#define CRASHPAD_UTIL_TEST_MULTIPROCESS_EXEC_H_ +#ifndef CRASHPAD_TEST_MULTIPROCESS_EXEC_H_ +#define CRASHPAD_TEST_MULTIPROCESS_EXEC_H_ #include #include #include "base/basictypes.h" #include "build/build_config.h" -#include "util/test/multiprocess.h" +#include "test/multiprocess.h" namespace crashpad { namespace test { @@ -75,4 +75,4 @@ class MultiprocessExec : public Multiprocess { } // namespace test } // namespace crashpad -#endif // CRASHPAD_UTIL_TEST_MULTIPROCESS_EXEC_H_ +#endif // CRASHPAD_TEST_MULTIPROCESS_EXEC_H_ diff --git a/util/test/multiprocess_exec_posix.cc b/test/multiprocess_exec_posix.cc similarity index 98% rename from util/test/multiprocess_exec_posix.cc rename to test/multiprocess_exec_posix.cc index 48a91ffb..caf2b476 100644 --- a/util/test/multiprocess_exec_posix.cc +++ b/test/multiprocess_exec_posix.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/test/multiprocess_exec.h" +#include "test/multiprocess_exec.h" #include #include @@ -21,9 +21,9 @@ #include "base/posix/eintr_wrapper.h" #include "gtest/gtest.h" +#include "test/errors.h" #include "util/misc/scoped_forbid_return.h" #include "util/posix/close_multiple.h" -#include "util/test/errors.h" namespace crashpad { namespace test { diff --git a/util/test/multiprocess_exec_test.cc b/test/multiprocess_exec_test.cc similarity index 96% rename from util/test/multiprocess_exec_test.cc rename to test/multiprocess_exec_test.cc index 8a5a6a95..dc916404 100644 --- a/util/test/multiprocess_exec_test.cc +++ b/test/multiprocess_exec_test.cc @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/test/multiprocess_exec.h" +#include "test/multiprocess_exec.h" #include "base/basictypes.h" #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" #include "gtest/gtest.h" +#include "test/paths.h" #include "util/file/file_io.h" -#include "util/test/paths.h" namespace crashpad { namespace test { diff --git a/util/test/multiprocess_exec_test_child.cc b/test/multiprocess_exec_test_child.cc similarity index 100% rename from util/test/multiprocess_exec_test_child.cc rename to test/multiprocess_exec_test_child.cc diff --git a/util/test/multiprocess_exec_win.cc b/test/multiprocess_exec_win.cc similarity index 99% rename from util/test/multiprocess_exec_win.cc rename to test/multiprocess_exec_win.cc index afd79b60..6a1262ba 100644 --- a/util/test/multiprocess_exec_win.cc +++ b/test/multiprocess_exec_win.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/test/multiprocess_exec.h" +#include "test/multiprocess_exec.h" #include "base/logging.h" #include "base/strings/utf_string_conversions.h" diff --git a/util/test/multiprocess_posix.cc b/test/multiprocess_posix.cc similarity index 98% rename from util/test/multiprocess_posix.cc rename to test/multiprocess_posix.cc index fbb39dfd..109ac313 100644 --- a/util/test/multiprocess_posix.cc +++ b/test/multiprocess_posix.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/test/multiprocess.h" +#include "test/multiprocess.h" #include #include @@ -28,8 +28,8 @@ #include "base/posix/eintr_wrapper.h" #include "base/strings/stringprintf.h" #include "gtest/gtest.h" +#include "test/errors.h" #include "util/misc/scoped_forbid_return.h" -#include "util/test/errors.h" namespace crashpad { namespace test { diff --git a/util/test/multiprocess_posix_test.cc b/test/multiprocess_posix_test.cc similarity index 99% rename from util/test/multiprocess_posix_test.cc rename to test/multiprocess_posix_test.cc index d0f133da..87a42385 100644 --- a/util/test/multiprocess_posix_test.cc +++ b/test/multiprocess_posix_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/test/multiprocess.h" +#include "test/multiprocess.h" #include #include @@ -20,8 +20,8 @@ #include "base/basictypes.h" #include "gtest/gtest.h" +#include "test/gtest_death_check.h" #include "util/file/file_io.h" -#include "util/test/gtest_death_check.h" namespace crashpad { namespace test { diff --git a/util/test/paths.cc b/test/paths.cc similarity index 96% rename from util/test/paths.cc rename to test/paths.cc index 5634b62d..b5eb60b9 100644 --- a/util/test/paths.cc +++ b/test/paths.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/test/paths.h" +#include "test/paths.h" #include #include @@ -27,8 +27,7 @@ namespace { bool IsTestDataRoot(const base::FilePath& candidate) { const base::FilePath marker_path = - candidate.Append(FILE_PATH_LITERAL("util")) - .Append(FILE_PATH_LITERAL("test")) + candidate.Append(FILE_PATH_LITERAL("test")) .Append(FILE_PATH_LITERAL("paths_test_data_root.txt")); #if !defined(OS_WIN) diff --git a/util/test/paths.h b/test/paths.h similarity index 93% rename from util/test/paths.h rename to test/paths.h index 844413d6..c1431696 100644 --- a/util/test/paths.h +++ b/test/paths.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CRASHPAD_UTIL_TEST_PATHS_H_ -#define CRASHPAD_UTIL_TEST_PATHS_H_ +#ifndef CRASHPAD_TEST_PATHS_H_ +#define CRASHPAD_TEST_PATHS_H_ #include "base/basictypes.h" #include "base/files/file_path.h" @@ -46,4 +46,4 @@ class Paths { } // namespace test } // namespace crashpad -#endif // CRASHPAD_UTIL_TEST_PATHS_H_ +#endif // CRASHPAD_TEST_PATHS_H_ diff --git a/util/test/paths_mac.cc b/test/paths_mac.cc similarity index 97% rename from util/test/paths_mac.cc rename to test/paths_mac.cc index 2d3d84ac..ce6c5f3b 100644 --- a/util/test/paths_mac.cc +++ b/test/paths_mac.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/test/paths.h" +#include "test/paths.h" #include #include diff --git a/util/test/paths_test.cc b/test/paths_test.cc similarity index 84% rename from util/test/paths_test.cc rename to test/paths_test.cc index 466e8b68..7cbca049 100644 --- a/util/test/paths_test.cc +++ b/test/paths_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/test/paths.h" +#include "test/paths.h" #include "base/files/file_path.h" #include "build/build_config.h" @@ -27,18 +27,17 @@ TEST(Paths, Executable) { base::FilePath executable_path = Paths::Executable(); base::FilePath executable_name = executable_path.BaseName(); #if defined(OS_WIN) - EXPECT_EQ(FILE_PATH_LITERAL("crashpad_util_test.exe"), + EXPECT_EQ(FILE_PATH_LITERAL("crashpad_test_test.exe"), executable_name.value()); #else - EXPECT_EQ("crashpad_util_test", executable_name.value()); + EXPECT_EQ("crashpad_test_test", executable_name.value()); #endif // OS_WIN } TEST(Paths, TestDataRoot) { base::FilePath test_data_root = Paths::TestDataRoot(); ScopedFileHandle file(LoggingOpenFileForRead( - test_data_root.Append(FILE_PATH_LITERAL("util")) - .Append(FILE_PATH_LITERAL("test")) + test_data_root.Append(FILE_PATH_LITERAL("test")) .Append(FILE_PATH_LITERAL("paths_test_data_root.txt")))); EXPECT_TRUE(file.is_valid()); } diff --git a/util/test/paths_test_data_root.txt b/test/paths_test_data_root.txt similarity index 100% rename from util/test/paths_test_data_root.txt rename to test/paths_test_data_root.txt diff --git a/util/test/paths_win.cc b/test/paths_win.cc similarity index 96% rename from util/test/paths_win.cc rename to test/paths_win.cc index bc299a42..95d0264e 100644 --- a/util/test/paths_win.cc +++ b/test/paths_win.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/test/paths.h" +#include "test/paths.h" #include diff --git a/util/test/scoped_temp_dir.cc b/test/scoped_temp_dir.cc similarity index 95% rename from util/test/scoped_temp_dir.cc rename to test/scoped_temp_dir.cc index a2f8d251..5c151cc0 100644 --- a/util/test/scoped_temp_dir.cc +++ b/test/scoped_temp_dir.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/test/scoped_temp_dir.h" +#include "test/scoped_temp_dir.h" namespace crashpad { namespace test { diff --git a/util/test/scoped_temp_dir.h b/test/scoped_temp_dir.h similarity index 93% rename from util/test/scoped_temp_dir.h rename to test/scoped_temp_dir.h index df9a4b7b..781975cd 100644 --- a/util/test/scoped_temp_dir.h +++ b/test/scoped_temp_dir.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CRASHPAD_UTIL_TEST_SCOPED_TEMP_DIR_ -#define CRASHPAD_UTIL_TEST_SCOPED_TEMP_DIR_ +#ifndef CRASHPAD_TEST_SCOPED_TEMP_DIR_ +#define CRASHPAD_TEST_SCOPED_TEMP_DIR_ #include "base/basictypes.h" #include "base/files/file_path.h" @@ -61,4 +61,4 @@ class ScopedTempDir { } // namespace test } // namespace crashpad -#endif // CRASHPAD_UTIL_TEST_SCOPED_TEMP_DIR_ +#endif // CRASHPAD_TEST_SCOPED_TEMP_DIR_ diff --git a/util/test/scoped_temp_dir_posix.cc b/test/scoped_temp_dir_posix.cc similarity index 96% rename from util/test/scoped_temp_dir_posix.cc rename to test/scoped_temp_dir_posix.cc index c906d780..2618dc8d 100644 --- a/util/test/scoped_temp_dir_posix.cc +++ b/test/scoped_temp_dir_posix.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/test/scoped_temp_dir.h" +#include "test/scoped_temp_dir.h" #include #include @@ -20,7 +20,7 @@ #include "base/logging.h" #include "gtest/gtest.h" -#include "util/test/errors.h" +#include "test/errors.h" namespace crashpad { namespace test { diff --git a/util/test/scoped_temp_dir_test.cc b/test/scoped_temp_dir_test.cc similarity index 98% rename from util/test/scoped_temp_dir_test.cc rename to test/scoped_temp_dir_test.cc index 9701a69a..6f3ce3a3 100644 --- a/util/test/scoped_temp_dir_test.cc +++ b/test/scoped_temp_dir_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/test/scoped_temp_dir.h" +#include "test/scoped_temp_dir.h" #include #include @@ -22,7 +22,7 @@ #include "base/posix/eintr_wrapper.h" #include "build/build_config.h" #include "gtest/gtest.h" -#include "util/test/errors.h" +#include "test/errors.h" #if defined(OS_POSIX) #include diff --git a/util/test/scoped_temp_dir_win.cc b/test/scoped_temp_dir_win.cc similarity index 98% rename from util/test/scoped_temp_dir_win.cc rename to test/scoped_temp_dir_win.cc index cdadd4f1..14674d9b 100644 --- a/util/test/scoped_temp_dir_win.cc +++ b/test/scoped_temp_dir_win.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/test/scoped_temp_dir.h" +#include "test/scoped_temp_dir.h" #include diff --git a/test/test.gyp b/test/test.gyp new file mode 100644 index 00000000..7c0175ca --- /dev/null +++ b/test/test.gyp @@ -0,0 +1,70 @@ +# Copyright 2015 The Crashpad Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +{ + 'includes': [ + '../build/crashpad.gypi', + ], + 'targets': [ + { + 'target_name': 'crashpad_test', + 'type': 'static_library', + 'dependencies': [ + '../compat/compat.gyp:crashpad_compat', + '../third_party/gtest/gtest.gyp:gtest', + '../third_party/mini_chromium/mini_chromium.gyp:base', + '../util/util.gyp:crashpad_util', + ], + 'include_dirs': [ + '..', + ], + 'sources': [ + 'errors.cc', + 'errors.h', + 'gtest_death_check.h', + 'mac/dyld.h', + 'mac/mach_errors.cc', + 'mac/mach_errors.h', + 'mac/mach_multiprocess.cc', + 'mac/mach_multiprocess.h', + 'multiprocess.h', + 'multiprocess_exec.h', + 'multiprocess_exec_posix.cc', + 'multiprocess_exec_win.cc', + 'multiprocess_posix.cc', + 'paths.cc', + 'paths.h', + 'paths_mac.cc', + 'paths_win.cc', + 'scoped_temp_dir.cc', + 'scoped_temp_dir.h', + 'scoped_temp_dir_posix.cc', + 'scoped_temp_dir_win.cc', + 'thread.cc', + 'thread.h', + 'thread_posix.cc', + 'thread_win.cc', + ], + 'conditions': [ + ['OS=="mac"', { + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/usr/lib/libbsm.dylib', + ], + }, + }], + ], + }, + ], +} diff --git a/test/test_test.gyp b/test/test_test.gyp new file mode 100644 index 00000000..2ed3bfaa --- /dev/null +++ b/test/test_test.gyp @@ -0,0 +1,52 @@ +# Copyright 2015 The Crashpad Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +{ + 'includes': [ + '../build/crashpad.gypi', + ], + 'targets': [ + { + 'target_name': 'crashpad_test_test', + 'type': 'executable', + 'dependencies': [ + 'crashpad_test_test_multiprocess_exec_test_child', + 'test.gyp:crashpad_test', + '../compat/compat.gyp:crashpad_compat', + '../third_party/gmock/gmock.gyp:gmock', + '../third_party/gmock/gmock.gyp:gmock_main', + '../third_party/gtest/gtest.gyp:gtest', + '../third_party/mini_chromium/mini_chromium.gyp:base', + '../util/util.gyp:crashpad_util', + ], + 'include_dirs': [ + '..', + ], + 'sources': [ + 'mac/mach_multiprocess_test.cc', + 'multiprocess_exec_test.cc', + 'multiprocess_posix_test.cc', + 'paths_test.cc', + 'scoped_temp_dir_test.cc', + ], + }, + { + 'target_name': 'crashpad_test_test_multiprocess_exec_test_child', + 'type': 'executable', + 'sources': [ + 'multiprocess_exec_test_child.cc', + ], + }, + ], +} diff --git a/util/test/thread.cc b/test/thread.cc similarity index 96% rename from util/test/thread.cc rename to test/thread.cc index 55d44985..baeeafa6 100644 --- a/util/test/thread.cc +++ b/test/thread.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/test/thread.h" +#include "test/thread.h" #include "gtest/gtest.h" diff --git a/util/test/thread.h b/test/thread.h similarity index 93% rename from util/test/thread.h rename to test/thread.h index 4fc249e8..46fe1e8e 100644 --- a/util/test/thread.h +++ b/test/thread.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CRASHPAD_UTIL_TEST_THREAD_H_ -#define CRASHPAD_UTIL_TEST_THREAD_H_ +#ifndef CRASHPAD_TEST_THREAD_H_ +#define CRASHPAD_TEST_THREAD_H_ #include "base/basictypes.h" #include "build/build_config.h" @@ -67,4 +67,4 @@ class Thread { } // namespace test } // namespace crashpad -#endif // CRASHPAD_UTIL_TEST_THREAD_H_ +#endif // CRASHPAD_TEST_THREAD_H_ diff --git a/util/test/thread_posix.cc b/test/thread_posix.cc similarity index 95% rename from util/test/thread_posix.cc rename to test/thread_posix.cc index 3a908845..9334d89a 100644 --- a/util/test/thread_posix.cc +++ b/test/thread_posix.cc @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/test/thread.h" +#include "test/thread.h" #include "gtest/gtest.h" -#include "util/test/errors.h" +#include "test/errors.h" namespace crashpad { namespace test { diff --git a/util/test/thread_win.cc b/test/thread_win.cc similarity index 95% rename from util/test/thread_win.cc rename to test/thread_win.cc index 1e277ebd..05c67ea8 100644 --- a/util/test/thread_win.cc +++ b/test/thread_win.cc @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/test/thread.h" +#include "test/thread.h" #include "gtest/gtest.h" -#include "util/test/errors.h" +#include "test/errors.h" namespace crashpad { namespace test { diff --git a/util/file/file_io_test.cc b/util/file/file_io_test.cc index 3a41a99f..2c5f96c4 100644 --- a/util/file/file_io_test.cc +++ b/util/file/file_io_test.cc @@ -18,9 +18,9 @@ #include "base/basictypes.h" #include "base/files/file_path.h" #include "gtest/gtest.h" -#include "util/test/errors.h" -#include "util/test/scoped_temp_dir.h" -#include "util/test/thread.h" +#include "test/errors.h" +#include "test/scoped_temp_dir.h" +#include "test/thread.h" namespace crashpad { namespace test { diff --git a/util/mac/xattr_test.cc b/util/mac/xattr_test.cc index a25cfbb5..a156a0a7 100644 --- a/util/mac/xattr_test.cc +++ b/util/mac/xattr_test.cc @@ -24,8 +24,8 @@ #include "base/posix/eintr_wrapper.h" #include "base/strings/stringprintf.h" #include "gtest/gtest.h" -#include "util/test/errors.h" -#include "util/test/scoped_temp_dir.h" +#include "test/errors.h" +#include "test/scoped_temp_dir.h" namespace crashpad { namespace test { diff --git a/util/mach/child_port_handshake_test.cc b/util/mach/child_port_handshake_test.cc index c2431924..12ca424c 100644 --- a/util/mach/child_port_handshake_test.cc +++ b/util/mach/child_port_handshake_test.cc @@ -16,9 +16,9 @@ #include "base/mac/scoped_mach_port.h" #include "gtest/gtest.h" +#include "test/multiprocess.h" #include "util/mach/child_port_types.h" #include "util/mach/mach_extensions.h" -#include "util/test/multiprocess.h" namespace crashpad { namespace test { diff --git a/util/mach/composite_mach_message_server_test.cc b/util/mach/composite_mach_message_server_test.cc index 95f7d952..0af82067 100644 --- a/util/mach/composite_mach_message_server_test.cc +++ b/util/mach/composite_mach_message_server_test.cc @@ -16,8 +16,8 @@ #include "base/strings/stringprintf.h" #include "gtest/gtest.h" +#include "test/gtest_death_check.h" #include "util/mach/mach_message.h" -#include "util/test/gtest_death_check.h" namespace crashpad { namespace test { diff --git a/util/mach/exc_client_variants_test.cc b/util/mach/exc_client_variants_test.cc index a42c00a3..a2ceafd5 100644 --- a/util/mach/exc_client_variants_test.cc +++ b/util/mach/exc_client_variants_test.cc @@ -21,13 +21,13 @@ #include "base/basictypes.h" #include "base/strings/stringprintf.h" #include "gtest/gtest.h" +#include "test/mac/mach_errors.h" +#include "test/mac/mach_multiprocess.h" #include "util/mach/exc_server_variants.h" #include "util/mach/exception_behaviors.h" #include "util/mach/mach_extensions.h" #include "util/mach/mach_message.h" #include "util/mach/mach_message_server.h" -#include "util/test/mac/mach_errors.h" -#include "util/test/mac/mach_multiprocess.h" namespace crashpad { namespace test { diff --git a/util/mach/exc_server_variants_test.cc b/util/mach/exc_server_variants_test.cc index 27b46630..b9015118 100644 --- a/util/mach/exc_server_variants_test.cc +++ b/util/mach/exc_server_variants_test.cc @@ -21,11 +21,11 @@ #include "base/strings/stringprintf.h" #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "test/mac/mach_errors.h" +#include "test/mac/mach_multiprocess.h" #include "util/mach/exception_behaviors.h" #include "util/mach/mach_extensions.h" #include "util/mach/mach_message.h" -#include "util/test/mac/mach_errors.h" -#include "util/test/mac/mach_multiprocess.h" namespace crashpad { namespace test { diff --git a/util/mach/exception_ports_test.cc b/util/mach/exception_ports_test.cc index 155e9187..37e44dd3 100644 --- a/util/mach/exception_ports_test.cc +++ b/util/mach/exception_ports_test.cc @@ -25,6 +25,8 @@ #include "base/mac/scoped_mach_port.h" #include "base/strings/stringprintf.h" #include "gtest/gtest.h" +#include "test/mac/mach_errors.h" +#include "test/mac/mach_multiprocess.h" #include "util/file/file_io.h" #include "util/mach/exc_server_variants.h" #include "util/mach/mach_extensions.h" @@ -32,8 +34,6 @@ #include "util/mach/mach_message_server.h" #include "util/misc/scoped_forbid_return.h" #include "util/synchronization/semaphore.h" -#include "util/test/mac/mach_errors.h" -#include "util/test/mac/mach_multiprocess.h" namespace crashpad { namespace test { diff --git a/util/mach/mach_extensions_test.cc b/util/mach/mach_extensions_test.cc index d3faebdf..aefe489d 100644 --- a/util/mach/mach_extensions_test.cc +++ b/util/mach/mach_extensions_test.cc @@ -16,7 +16,7 @@ #include "base/mac/scoped_mach_port.h" #include "gtest/gtest.h" -#include "util/test/mac/mach_errors.h" +#include "test/mac/mach_errors.h" namespace crashpad { namespace test { diff --git a/util/mach/mach_message_server_test.cc b/util/mach/mach_message_server_test.cc index a3a2a364..952fa4bf 100644 --- a/util/mach/mach_message_server_test.cc +++ b/util/mach/mach_message_server_test.cc @@ -22,11 +22,11 @@ #include "base/basictypes.h" #include "base/mac/scoped_mach_port.h" #include "gtest/gtest.h" +#include "test/mac/mach_errors.h" +#include "test/mac/mach_multiprocess.h" #include "util/file/file_io.h" #include "util/mach/mach_extensions.h" #include "util/mach/mach_message.h" -#include "util/test/mac/mach_errors.h" -#include "util/test/mac/mach_multiprocess.h" namespace crashpad { namespace test { diff --git a/util/mach/mach_message_test.cc b/util/mach/mach_message_test.cc index 578195a3..6e91dccb 100644 --- a/util/mach/mach_message_test.cc +++ b/util/mach/mach_message_test.cc @@ -19,8 +19,8 @@ #include "base/basictypes.h" #include "base/mac/scoped_mach_port.h" #include "gtest/gtest.h" +#include "test/mac/mach_errors.h" #include "util/mach/mach_extensions.h" -#include "util/test/mac/mach_errors.h" namespace crashpad { namespace test { diff --git a/util/mach/notify_server_test.cc b/util/mach/notify_server_test.cc index f835cedf..7a19a742 100644 --- a/util/mach/notify_server_test.cc +++ b/util/mach/notify_server_test.cc @@ -18,10 +18,10 @@ #include "base/mac/scoped_mach_port.h" #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "test/mac/mach_errors.h" #include "util/mach/mach_extensions.h" #include "util/mach/mach_message.h" #include "util/mach/mach_message_server.h" -#include "util/test/mac/mach_errors.h" namespace crashpad { namespace test { diff --git a/util/mach/scoped_task_suspend_test.cc b/util/mach/scoped_task_suspend_test.cc index 01d967ff..b53b83dc 100644 --- a/util/mach/scoped_task_suspend_test.cc +++ b/util/mach/scoped_task_suspend_test.cc @@ -17,8 +17,8 @@ #include #include "gtest/gtest.h" -#include "util/test/mac/mach_errors.h" -#include "util/test/mac/mach_multiprocess.h" +#include "test/mac/mach_errors.h" +#include "test/mac/mach_multiprocess.h" namespace crashpad { namespace test { diff --git a/util/mach/task_memory_test.cc b/util/mach/task_memory_test.cc index 523e95a5..2247ed2f 100644 --- a/util/mach/task_memory_test.cc +++ b/util/mach/task_memory_test.cc @@ -24,7 +24,7 @@ #include "base/mac/scoped_mach_vm.h" #include "base/memory/scoped_ptr.h" #include "gtest/gtest.h" -#include "util/test/mac/mach_errors.h" +#include "test/mac/mach_errors.h" namespace crashpad { namespace test { diff --git a/util/misc/initialization_state_dcheck_test.cc b/util/misc/initialization_state_dcheck_test.cc index c1c8e7e2..7c68255e 100644 --- a/util/misc/initialization_state_dcheck_test.cc +++ b/util/misc/initialization_state_dcheck_test.cc @@ -16,7 +16,7 @@ #include "base/logging.h" #include "gtest/gtest.h" -#include "util/test/gtest_death_check.h" +#include "test/gtest_death_check.h" namespace crashpad { namespace test { diff --git a/util/misc/scoped_forbid_return_test.cc b/util/misc/scoped_forbid_return_test.cc index 93a3e327..78787d49 100644 --- a/util/misc/scoped_forbid_return_test.cc +++ b/util/misc/scoped_forbid_return_test.cc @@ -16,7 +16,7 @@ #include "base/compiler_specific.h" #include "gtest/gtest.h" -#include "util/test/gtest_death_check.h" +#include "test/gtest_death_check.h" namespace crashpad { namespace test { diff --git a/util/net/http_body_test.cc b/util/net/http_body_test.cc index 8e58c205..6bfcff36 100644 --- a/util/net/http_body_test.cc +++ b/util/net/http_body_test.cc @@ -15,8 +15,8 @@ #include "util/net/http_body.h" #include "gtest/gtest.h" +#include "test/paths.h" #include "util/net/http_body_test_util.h" -#include "util/test/paths.h" namespace crashpad { namespace test { diff --git a/util/net/http_multipart_builder_test.cc b/util/net/http_multipart_builder_test.cc index 5517f67b..d024c520 100644 --- a/util/net/http_multipart_builder_test.cc +++ b/util/net/http_multipart_builder_test.cc @@ -17,10 +17,10 @@ #include #include "gtest/gtest.h" +#include "test/gtest_death_check.h" +#include "test/paths.h" #include "util/net/http_body.h" #include "util/net/http_body_test_util.h" -#include "util/test/gtest_death_check.h" -#include "util/test/paths.h" namespace crashpad { namespace test { diff --git a/util/net/http_transport_test.cc b/util/net/http_transport_test.cc index 375ccfc3..dc3775b1 100644 --- a/util/net/http_transport_test.cc +++ b/util/net/http_transport_test.cc @@ -29,12 +29,12 @@ #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" #include "gtest/gtest.h" +#include "test/multiprocess_exec.h" +#include "test/paths.h" #include "util/file/file_io.h" #include "util/net/http_body.h" #include "util/net/http_headers.h" #include "util/net/http_multipart_builder.h" -#include "util/test/multiprocess_exec.h" -#include "util/test/paths.h" namespace crashpad { namespace test { diff --git a/util/posix/process_info_test.cc b/util/posix/process_info_test.cc index b052e10b..59315a0b 100644 --- a/util/posix/process_info_test.cc +++ b/util/posix/process_info_test.cc @@ -24,7 +24,7 @@ #include "base/basictypes.h" #include "build/build_config.h" #include "gtest/gtest.h" -#include "util/test/errors.h" +#include "test/errors.h" #if defined(OS_MACOSX) #include diff --git a/util/thread/thread_log_messages_test.cc b/util/thread/thread_log_messages_test.cc index 4ffe1fc8..96e2e91a 100644 --- a/util/thread/thread_log_messages_test.cc +++ b/util/thread/thread_log_messages_test.cc @@ -19,7 +19,7 @@ #include "base/logging.h" #include "base/strings/stringprintf.h" #include "gtest/gtest.h" -#include "util/test/thread.h" +#include "test/thread.h" namespace crashpad { namespace test { diff --git a/util/util_test.gyp b/util/util_test.gyp index cf4d4648..0580e994 100644 --- a/util/util_test.gyp +++ b/util/util_test.gyp @@ -17,63 +17,13 @@ '../build/crashpad.gypi', ], 'targets': [ - { - 'target_name': 'crashpad_util_test_lib', - 'type': 'static_library', - 'dependencies': [ - 'util.gyp:crashpad_util', - '../compat/compat.gyp:crashpad_compat', - '../third_party/gtest/gtest.gyp:gtest', - '../third_party/mini_chromium/mini_chromium.gyp:base', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'test/errors.cc', - 'test/errors.h', - 'test/gtest_death_check.h', - 'test/mac/dyld.h', - 'test/mac/mach_errors.cc', - 'test/mac/mach_errors.h', - 'test/mac/mach_multiprocess.cc', - 'test/mac/mach_multiprocess.h', - 'test/multiprocess.h', - 'test/multiprocess_exec.h', - 'test/multiprocess_exec_posix.cc', - 'test/multiprocess_exec_win.cc', - 'test/multiprocess_posix.cc', - 'test/paths.cc', - 'test/paths.h', - 'test/paths_mac.cc', - 'test/paths_win.cc', - 'test/scoped_temp_dir.cc', - 'test/scoped_temp_dir.h', - 'test/scoped_temp_dir_posix.cc', - 'test/scoped_temp_dir_win.cc', - 'test/thread.cc', - 'test/thread.h', - 'test/thread_posix.cc', - 'test/thread_win.cc', - ], - 'conditions': [ - ['OS=="mac"', { - 'link_settings': { - 'libraries': [ - '$(SDKROOT)/usr/lib/libbsm.dylib', - ], - }, - }], - ], - }, { 'target_name': 'crashpad_util_test', 'type': 'executable', 'dependencies': [ - 'crashpad_util_test_lib', - 'crashpad_util_test_multiprocess_exec_test_child', 'util.gyp:crashpad_util', '../compat/compat.gyp:crashpad_compat', + '../test/test.gyp:crashpad_test', '../third_party/gmock/gmock.gyp:gmock', '../third_party/gmock/gmock.gyp:gmock_main', '../third_party/gtest/gtest.gyp:gtest', @@ -125,11 +75,6 @@ 'stdlib/strnlen_test.cc', 'string/split_string_test.cc', 'synchronization/semaphore_test.cc', - 'test/mac/mach_multiprocess_test.cc', - 'test/multiprocess_exec_test.cc', - 'test/multiprocess_posix_test.cc', - 'test/paths_test.cc', - 'test/scoped_temp_dir_test.cc', 'thread/thread_log_messages_test.cc', 'win/process_info_test.cc', 'win/time_test.cc', @@ -143,6 +88,10 @@ }, }], ['OS=="win"', { + 'dependencies': [ + 'crashpad_util_test_process_info_test_child_x64', + 'crashpad_util_test_process_info_test_child_x86', + ], 'link_settings': { 'libraries': [ '-lrpcrt4.lib', @@ -151,13 +100,6 @@ }], ], }, - { - 'target_name': 'crashpad_util_test_multiprocess_exec_test_child', - 'type': 'executable', - 'sources': [ - 'test/multiprocess_exec_test_child.cc', - ], - }, ], 'conditions': [ ['OS=="win"', { diff --git a/util/win/process_info_test.cc b/util/win/process_info_test.cc index 38fd84a8..ecae69f8 100644 --- a/util/win/process_info_test.cc +++ b/util/win/process_info_test.cc @@ -20,8 +20,8 @@ #include "base/files/file_path.h" #include "build/build_config.h" #include "gtest/gtest.h" +#include "test/paths.h" #include "util/misc/uuid.h" -#include "util/test/paths.h" #include "util/win/scoped_handle.h" namespace crashpad {