Browse files

Copy test_data for coverage build

The unittests now require test_data to be present or they will fail. This CL updates 'generate_coverage' to recursively copy the test_data directory from the build directory prior to invoking the unittests.
Review URL:

git-svn-id: 15e8cca8-e42c-11de-a347-f34a4f72eb7d
  • Loading branch information... committed Jul 4, 2011
1 parent 3972ffc commit f2e9f166a0588d1c3dd12bf452b65bcd5940fd8f
Showing with 8 additions and 4 deletions.
  1. +8 −4 syzygy/build/
@@ -97,14 +97,18 @@ def _InstrumentExecutables(self):
work_dir = self._work_dir'Build dir "%s".', build_dir)
# Make a copy of all unittest executables, DLLs and PDBs in
# Make a copy of all unittest executables, DLLs, PDBs and test_data in
# the build directory.
files_to_copy = []
for pattern in ('*_unittests.exe', '*.dll', '*.pdb'):
for pattern in ('*_unittests.exe', '*.dll', '*.pdb', 'test_data'):
files = glob.glob(os.path.join(build_dir, pattern))
for path in files:'Copying "%s" to "%s".', path, work_dir)
shutil.copy(path, work_dir)
if os.path.isdir(path):
# If the source file is a directory, do a recursive copy.
dst = os.path.join(work_dir, os.path.basename(path))
shutil.copytree(path, dst)
shutil.copy(path, work_dir)
# Instrument all EXEs in the work dir.
for exe in glob.glob(os.path.join(work_dir, '*.exe')):

0 comments on commit f2e9f16

Please sign in to comment.