a780201 / swtoolkit

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

ComponentTestProgram() fails to build files with periods in filename #15

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Call ComponentTestProgram(prog_name='test_foo_v1.0.101.0_unsigned', 
...).
2. Run hammer.

What is the expected output? What do you see instead?
I expect a test program named test_foo_v1.0.101.0_unsigned.exe.
Instead, I get the following error:
scons: *** An executable should have exactly one target with the suffix: 
.exe
File "...\site_scons\site_tools\component_builders.py", line 415, in Compo
nentTestProgram

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

Please provide any additional information below.
ComponentProgram() can build this filename.
ComponentProgram() and ComponentTestProgram() appear to be more different 
than one might think. ComponentTestProgram() also does not accept extension 
in the prog_name parameter like ComponentProgram() does.

Original issue reported on code.google.com by ddor...@google.com on 2 Feb 2010 at 9:43

GoogleCodeExporter commented 8 years ago
ComponentTestProgram() also doesn't support inferring the prog_name from the 
input 
file(s).

For example, this works:
  env.ComponentProgram('test_bar.cc')
but this doesn't:
  env.ComponentTestProgram('test_bar.cc')

Instead, one must use this:
  env.ComponentTestProgram(prog_name='test_bar', source='test_bar.cc')

Note that the same is true when using source array. For example, the following 
works:
  env.ComponentProgram(['foo_test.cc', 'test_utils.cc'])

Original comment by ddor...@google.com on 3 Feb 2010 at 1:22