Sheribaby / swtoolkit

Automatically exported from code.google.com/p/swtoolkit
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Hammer "installs" PDBs during each coverage build even if they have not changed #12

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. hammer.bat -k MODE=coverage-win --verbose
2. After successful build, repeat step 1.

What is the expected output? What do you see instead?
No build operations should occur as nothing as changed.

Instead, I see the following output for each PDB.
Install file: "scons-out\coverage-win\obj\foo\foo.pdb" as "scons-
out\coverage-win\staging\foo.pdb"

What version of the product are you using? On what operating system?
0.9.1
Windows XP SP3

Please provide any additional information below.

This is caused by the following code in _CoverageInstall() in 
target_platform_windows.py.

  if (source_ext == '.pdb' and
      source_under_dst_root and in_instrumentation_paths):
    # PDBs going into $TESTS_DIR will be copied as part of the EXE/DLL 
copy.
    # TODO: Put in the proper env.Requires steps instead.
    return

The PDB is never copied to staging and the PDB created when copying the 
EXE/DLL has a different name, so Hammer tries to copy it every time it 
runs.

Putting the following before return fixes this, but results in two PDBs for 
each binary.
  env.Execute('copy "%s" "%s"' % (source, dest))

It's possible addressing the TODO in the code would also address this.

Original issue reported on code.google.com by ddor...@google.com on 7 Jan 2010 at 7:19