From dc65a1dc6754ca52c7d63dd1be3d7469b5948fe7 Mon Sep 17 00:00:00 2001 From: "sebmarchand@chromium.org" Date: Tue, 21 Jan 2014 17:19:24 +0000 Subject: Allows chrome_elf_unittests to be run under SyzyASan. This also fix a missing dependency on chrome_elf_unittests, it should have a dependency on chrome_elf.dll and chrome.exe if you want to be able to do: - ninja -C out\Release chrome_elf_unittests - out\Release\chrome_elf_unittests.exe on a fresh checkout... R=robertshield@chromium.org Review URL: https://codereview.chromium.org/132823006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246061 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome_elf/chrome_elf.gyp | 15 ++++++++++++++- chrome_elf/elf_imports_unittest.cc | 3 +++ 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'chrome_elf') diff --git a/chrome_elf/chrome_elf.gyp b/chrome_elf/chrome_elf.gyp index 92c8294..d011bbb 100644 --- a/chrome_elf/chrome_elf.gyp +++ b/chrome_elf/chrome_elf.gyp @@ -41,7 +41,8 @@ }, }, { - 'target_name': 'chrome_elf_unittests', + 'target_name': 'chrome_elf_unittests_exe', + 'product_name': 'chrome_elf_unittests', 'type': 'executable', 'sources': [ 'blacklist/test/blacklist_test.cc', @@ -67,6 +68,18 @@ ], }, { + # A dummy target to ensure that chrome_elf.dll and chrome.exe gets build + # when building chrome_elf_unittests.exe without introducing an + # explicit runtime dependency. + 'target_name': 'chrome_elf_unittests', + 'type': 'none', + 'dependencies': [ + '../chrome/chrome.gyp:chrome', + 'chrome_elf', + 'chrome_elf_unittests_exe', + ], + }, + { 'target_name': 'chrome_elf_lib', 'type': 'static_library', 'include_dirs': [ diff --git a/chrome_elf/elf_imports_unittest.cc b/chrome_elf/elf_imports_unittest.cc index 029189c..3e9b4f9 100644 --- a/chrome_elf/elf_imports_unittest.cc +++ b/chrome_elf/elf_imports_unittest.cc @@ -62,6 +62,9 @@ TEST_F(ELFImportsTest, ChromeElfSanityCheck) { static const char* const kValidFilePatterns[] = { "KERNEL32.dll", "MSVC*", +#if defined(ADDRESS_SANITIZER) + "syzyasan_rtl.dll", +#endif "ADVAPI32.dll"}; // Make sure all of ELF's imports are in the valid imports list. -- cgit v1.1