summaryrefslogtreecommitdiff
path: root/test/MSVC
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2007-06-01 21:14:13 +0000
committerSteven Knight <knight@baldmt.com>2007-06-01 21:14:13 +0000
commit633111535e4b074fb31586e621a8daa759213da6 (patch)
tree7e913c029bfbdf97ba614bb07f639af5d45ae2ae /test/MSVC
parent5c6f6bede4fd5a862a310d2c8886758d19b78f17 (diff)
downloadscons-633111535e4b074fb31586e621a8daa759213da6.tar.gz
Merged revisions 1907-1940,1942-1967 via svnmerge from
http://scons.tigris.org/svn/scons/branches/core ........ r1914 | stevenknight | 2007-05-19 20:18:45 -0700 (Sat, 19 May 2007) | 4 lines Use the dict() builtin, not a by-hand function, to assemble --debug=explain info. Update our backwards-compatibility dict() function so its calling signature matches the later SCons dict() builtin, and so it actually works. ........ r1920 | stevenknight | 2007-05-21 19:59:00 -0700 (Mon, 21 May 2007) | 4 lines Issue 1652: only add the {base}_p.c and {base}_data.c files if the /proxy or /dlldata arguments are present (respectively). (Allan Erskine) ........ r1921 | stevenknight | 2007-05-21 20:09:54 -0700 (Mon, 21 May 2007) | 2 lines Add initial .svnt/conf file for experimental use. ........ r1924 | stevenknight | 2007-05-22 17:51:34 -0700 (Tue, 22 May 2007) | 3 lines Don't let tool initialization overwrite ${C,CXX}FILESUFFIX if they're already set. ........ r1925 | stevenknight | 2007-05-22 19:14:27 -0700 (Tue, 22 May 2007) | 3 lines Change the --debug=explain message when AlwaysBuild() is set from the default "unknown reasons" to "because AlwaysBuild() is specified." ........ r1927 | stevenknight | 2007-05-23 05:20:32 -0700 (Wed, 23 May 2007) | 3 lines Issue 1658: Find Java anonymous classes when the next token after the name is an open parenthesis. (Jan Nijtmans) ........ r1928 | stevenknight | 2007-05-23 11:50:20 -0700 (Wed, 23 May 2007) | 3 lines Issue 1313: add support for {Get,Set}Option('help') and {Get,Set}Option('random') . ........ r1929 | stevenknight | 2007-05-23 11:56:18 -0700 (Wed, 23 May 2007) | 3 lines Issue 1362: Push/retrieve built symlinks to/from a CacheDir() as symlinks, not by copying file contents. ........ r1930 | stevenknight | 2007-05-23 12:55:12 -0700 (Wed, 23 May 2007) | 3 lines Issue 1638: add LaTeX scanner support for finding dependencies from \usepackage{} directives. (Sohail Somani) ........ r1932 | stevenknight | 2007-05-24 05:06:45 -0700 (Thu, 24 May 2007) | 3 lines Add a section mentioning that libraries can be built from mixed lists of source code and object files. (Follow-up from IRC chat.) ........ r1933 | stevenknight | 2007-05-24 11:18:30 -0700 (Thu, 24 May 2007) | 2 lines Issue 1467: add /opt/SUNWspro/bin to the default execution $PATH on Solaris. ........ r1934 | stevenknight | 2007-05-24 13:10:01 -0700 (Thu, 24 May 2007) | 3 lines Support running tests when Python is in a path that contains spaces (like "C:\Program Files\Python..."). ........ r1935 | stevenknight | 2007-05-24 13:11:52 -0700 (Thu, 24 May 2007) | 4 lines Issue 1479: print multiple projects in a Visual Studio 7.[01] solution file, generating a separate GUID for each instead of re-using the solution GUID. (Mark Bertoglio) ........ r1937 | stevenknight | 2007-05-26 14:35:17 -0700 (Sat, 26 May 2007) | 4 lines Issue 1659: when stringifying a generator action, fall back to using the default construction environment, not an empty dictionary, if not environment was supplied. ........ r1938 | stevenknight | 2007-05-29 05:14:37 -0700 (Tue, 29 May 2007) | 2 lines Re-run tests if any of the test infrastructure changed, too. ........ r1940 | stevenknight | 2007-05-29 06:58:42 -0700 (Tue, 29 May 2007) | 2 lines Issue 1634: "define HAVE_FEATURE 1" lines in generated config.h files. ........ r1943 | stevenknight | 2007-05-29 13:24:34 -0700 (Tue, 29 May 2007) | 2 lines Issue 1426: Generalize AlwaysBuild() to non-File Nodes. ........ r1945 | stevenknight | 2007-05-30 08:15:25 -0700 (Wed, 30 May 2007) | 3 lines Clean up emitter unit tests: subdivide one large test case into separate tests, code renaming and reorganizing for readability. ........ r1947 | stevenknight | 2007-05-30 10:22:49 -0700 (Wed, 30 May 2007) | 4 lines Issue 1656: two PDB fixes: 1) support expansion of $TARGET, etc. in emitted file names 2) put the output PDB file in the target's build_dir ........ r1951 | stevenknight | 2007-05-31 12:51:42 -0700 (Thu, 31 May 2007) | 3 lines Refactor the checkLogAndStdout() function into a TestSCons method so we can split the sub-tests into their own scripts. ........ r1952 | stevenknight | 2007-05-31 13:00:56 -0700 (Thu, 31 May 2007) | 3 lines Also move the definition of what system library we need to use for Configure tests into the TestSCons class. ........ r1953 | stevenknight | 2007-05-31 14:12:16 -0700 (Thu, 31 May 2007) | 2 lines Refactor the Configure context subtests into separate scripts. ........ r1954 | stevenknight | 2007-05-31 14:18:11 -0700 (Thu, 31 May 2007) | 3 lines Get rid of the work_dir argument to checkLogAndStdout(), since we're no longer executing sub-tests from separate subdirectories. ........ r1955 | stevenknight | 2007-05-31 14:35:20 -0700 (Thu, 31 May 2007) | 2 lines Move the test to its correct subdirectory. Oops. ........ r1958 | stevenknight | 2007-06-01 08:35:50 -0700 (Fri, 01 Jun 2007) | 2 lines Skip the Visual C/C++ PDB + BuildDir test when not run on Windows. ........ r1959 | stevenknight | 2007-06-01 09:35:09 -0700 (Fri, 01 Jun 2007) | 2 lines Support an AddMethod() global function and construction environment method. ........ r1960 | stevenknight | 2007-06-01 09:52:59 -0700 (Fri, 01 Jun 2007) | 3 lines Python 1.5 compatibility in the test infrastructure added to support the refactored Configure tests. ........ r1963 | stevenknight | 2007-06-01 12:29:48 -0700 (Fri, 01 Jun 2007) | 2 lines Python 1.5 compatibility fix for AddMethod(). ........
Diffstat (limited to 'test/MSVC')
-rw-r--r--test/MSVC/multiple-pdb.py83
-rw-r--r--test/MSVC/pdb-BuildDir-path.py76
2 files changed, 159 insertions, 0 deletions
diff --git a/test/MSVC/multiple-pdb.py b/test/MSVC/multiple-pdb.py
new file mode 100644
index 00000000..f359fb97
--- /dev/null
+++ b/test/MSVC/multiple-pdb.py
@@ -0,0 +1,83 @@
+#!/usr/bin/env python
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+"""
+Verify that setting $PDB to '${TARGET}.pdb allows us to build multiple
+programs with separate .pdb files from the same environment.
+
+Under the covers, this verifies that emitters support expansion of the
+$TARGET variable (and implicitly $SOURCE), using the original specified
+list(s).
+"""
+
+import sys
+
+import TestSCons
+
+_exe = TestSCons._exe
+
+test = TestSCons.TestSCons()
+
+if sys.platform != 'win32':
+ msg = "Skipping Visual C/C++ test on non-Windows platform '%s'\n" % sys.platform
+ test.skip_test(msg)
+
+test.write('SConstruct', """\
+env = Environment(PDB = '${TARGET}.pdb')
+env.Program('test1.cpp')
+env.Program('test2.cpp')
+""")
+
+test.write('test1.cpp', """\
+#include <stdio.h>
+#include <stdlib.h>
+int
+main(int argc, char *argv)
+{
+ printf("test1.cpp\\n");
+ exit (0);
+}
+""")
+
+test.write('test2.cpp', """\
+#include <stdio.h>
+#include <stdlib.h>
+int
+main(int argc, char *argv)
+{
+ printf("test2.cpp\\n");
+ exit (0);
+}
+""")
+
+test.run(arguments = '.')
+
+test.must_exist('test1%s' % _exe)
+test.must_exist('test1%s.pdb' % _exe)
+test.must_exist('test2%s' % _exe)
+test.must_exist('test2%s.pdb' % _exe)
+
+test.pass_test()
diff --git a/test/MSVC/pdb-BuildDir-path.py b/test/MSVC/pdb-BuildDir-path.py
new file mode 100644
index 00000000..223e5350
--- /dev/null
+++ b/test/MSVC/pdb-BuildDir-path.py
@@ -0,0 +1,76 @@
+#!/usr/bin/env python
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+"""
+Verify that .pdb files get put in a build_dir correctly.
+"""
+
+import sys
+
+import TestSCons
+
+_exe = TestSCons._exe
+
+test = TestSCons.TestSCons()
+
+if sys.platform != 'win32':
+ msg = "Skipping Visual C/C++ test on non-Windows platform '%s'\n" % sys.platform
+ test.skip_test(msg)
+
+test.subdir('src')
+
+test.write('SConstruct', """\
+env = Environment()
+env.Append(BINDIR = '#bin')
+
+Export('env')
+SConscript('#src/SConscript', duplicate = 0, build_dir = '#.build')
+""")
+
+test.write(['src', 'SConscript'], """\
+Import('env')
+env['PDB'] = '${TARGET}.pdb'
+p = env.Program('test.exe', 'test.cpp')
+env.Install(env['BINDIR'], p)
+""")
+
+test.write(['src', 'test.cpp'], """\
+#include <stdio.h>
+#include <stdlib.h>
+int
+main(int argc, char *argv)
+{
+ printf("test.cpp\\n");
+ exit (0);
+}
+""")
+
+test.run(arguments = '.')
+
+test.must_exist(['.build', 'test%s' % _exe])
+test.must_exist(['.build', 'test%s.pdb' % _exe])
+
+test.pass_test()