summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-01-16 02:56:17 (GMT)
committerSteven Knight <knight@baldmt.com>2004-01-16 02:56:17 (GMT)
commit4ad2624f3ec90a7dc4865b2955f8f972dec8cee2 (patch)
tree7eeb191bfb36afce097c1bbc7992fc3e18171187 /test
parent238043e03ddcf883374431f46a0ad311122ac909 (diff)
downloadSCons-4ad2624f3ec90a7dc4865b2955f8f972dec8cee2.zip
SCons-4ad2624f3ec90a7dc4865b2955f8f972dec8cee2.tar.gz
SCons-4ad2624f3ec90a7dc4865b2955f8f972dec8cee2.tar.bz2
Make the midl builder put the targets in the target directory, rather than the source directory. (Anthony Roach)
Diffstat (limited to 'test')
-rw-r--r--test/midl.py44
1 files changed, 39 insertions, 5 deletions
diff --git a/test/midl.py b/test/midl.py
index f2bb5d2..a0ff5dd 100644
--- a/test/midl.py
+++ b/test/midl.py
@@ -43,12 +43,14 @@ test.write('SConstruct',"""
import os.path
import os
-build = '#build'
env = Environment(CCFLAGS = ' -nologo ', CPPPATH='${TARGET.dir}')
-Export('env','build')
+Export('env')
-BuildDir(build, 'src')
-SConscript(os.path.join(build,'SConscript'))
+BuildDir('build', 'src')
+SConscript(os.path.join('build','SConscript'))
+
+BuildDir('build2', 'src', duplicate=0)
+SConscript(os.path.join('build2','SConscript'))
""")
test.subdir('src','build')
@@ -56,7 +58,7 @@ test.subdir('src','build')
test.write('src/SConscript',"""
import os.path
-Import('env','build')
+Import('env')
local = env.Copy(WIN32_INSERT_DEF = 1)
@@ -407,4 +409,36 @@ test.fail_test(os.path.exists(test.workpath(os.path.join('build','bar.dll'))))
test.fail_test(os.path.exists(test.workpath(os.path.join('build','bar.lib'))))
test.fail_test(os.path.exists(test.workpath(os.path.join('build','bar.exp'))))
+test.run(arguments=os.path.join('build2','bar.dll'))
+
+test.fail_test(not os.path.exists(test.workpath(os.path.join('build2','BarPCH.pch'))))
+test.fail_test(not os.path.exists(test.workpath(os.path.join('build2','BarPCH.obj'))))
+test.fail_test(not os.path.exists(test.workpath(os.path.join('build2','bar.tlb'))))
+test.fail_test(not os.path.exists(test.workpath(os.path.join('build2','bar.h'))))
+test.fail_test(not os.path.exists(test.workpath(os.path.join('build2','bar_i.c'))))
+test.fail_test(not os.path.exists(test.workpath(os.path.join('build2','bar_p.c'))))
+test.fail_test(not os.path.exists(test.workpath(os.path.join('build2','bar_data.c'))))
+test.fail_test(not os.path.exists(test.workpath(os.path.join('build2','BarObject.obj'))))
+test.fail_test(not os.path.exists(test.workpath(os.path.join('build2','bar.obj'))))
+test.fail_test(not os.path.exists(test.workpath(os.path.join('build2','bar.res'))))
+test.fail_test(not os.path.exists(test.workpath(os.path.join('build2','bar.dll'))))
+test.fail_test(not os.path.exists(test.workpath(os.path.join('build2','bar.lib'))))
+test.fail_test(not os.path.exists(test.workpath(os.path.join('build2','bar.exp'))))
+
+test.run(arguments='-c .')
+
+test.fail_test(os.path.exists(test.workpath(os.path.join('build2','BarPCH.pch'))))
+test.fail_test(os.path.exists(test.workpath(os.path.join('build2','BarPCH.obj'))))
+test.fail_test(os.path.exists(test.workpath(os.path.join('build2','bar.tlb'))))
+test.fail_test(os.path.exists(test.workpath(os.path.join('build2','bar.h'))))
+test.fail_test(os.path.exists(test.workpath(os.path.join('build2','bar_i.c'))))
+test.fail_test(os.path.exists(test.workpath(os.path.join('build2','bar_p.c'))))
+test.fail_test(os.path.exists(test.workpath(os.path.join('build2','bar_data.c'))))
+test.fail_test(os.path.exists(test.workpath(os.path.join('build2','BarObject.obj'))))
+test.fail_test(os.path.exists(test.workpath(os.path.join('build2','bar.obj'))))
+test.fail_test(os.path.exists(test.workpath(os.path.join('build2','bar.res'))))
+test.fail_test(os.path.exists(test.workpath(os.path.join('build2','bar.dll'))))
+test.fail_test(os.path.exists(test.workpath(os.path.join('build2','bar.lib'))))
+test.fail_test(os.path.exists(test.workpath(os.path.join('build2','bar.exp'))))
+
test.pass_test()