5 # Permission is hereby granted, free of charge, to any person obtaining
6 # a copy of this software and associated documentation files (the
7 # "Software"), to deal in the Software without restriction, including
8 # without limitation the rights to use, copy, modify, merge, publish,
9 # distribute, sublicense, and/or sell copies of the Software, and to
10 # permit persons to whom the Software is furnished to do so, subject to
11 # the following conditions:
13 # The above copyright notice and this permission notice shall be included
14 # in all copies or substantial portions of the Software.
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
17 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
18 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 This test verifies that the build command signatures do not depend on
27 the case of the drive letter on Windows. This is important because Windows is
28 inconsistent about which case is used for the drive letter.
31 __revision__
= "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
37 test
= TestSCons
.TestSCons(match
=TestCmd
.match_re
)
39 test
.skip_if_not_msvc()
41 test
.subdir('src', 'build', 'include', 'src2')
43 test
.write('src/SConstruct', """
44 env=Environment(LIBS=['../build/foo'], CPPPATH=['../include'], CCCOM='$CC $CCFLAGS $CPPFLAGS $_CPPINCFLAGS /c ${SOURCES.abspath} /Fo$TARGET')
45 foo=env.Object('../build/foo', 'foo.c')
46 Default(env.Library('../build/foo', foo))
47 Default(env.SharedLibrary('../build/bar', 'bar.c'))
48 Default(env.Program('../build/bar', ['main.c', '../src2/blat.c', '../build/bar.lib']))
51 test
.write('src/foo.c', """
58 test
.write('src/bar.c', """
59 __declspec(dllexport) int bar(void)
65 test
.write('src/main.c', """
73 test
.write('src2/blat.c', """
80 test
.write('include/bar.h', """
86 drive
, rest
= os
.path
.splitdrive(test
.workpath('src'))
88 drive_upper
= drive
.upper()
89 drive_lower
= drive
.lower()
90 rest_upper
= rest
[0] + rest
[1].upper() + rest
[2:]
91 rest_lower
= rest
[0] + rest
[1].lower() + rest
[2:]
94 os
.path
.join(drive_upper
, rest_upper
),
95 os
.path
.join(drive_upper
, rest_lower
),
96 os
.path
.join(drive_lower
, rest_upper
),
97 os
.path
.join(drive_lower
, rest_lower
),
100 test
.run(chdir
=combinations
[0])
102 for dir in combinations
[1:]:
103 test
.run(chdir
=dir, stdout
=test
.wrap_stdout("""\
104 scons: .* is up to date.
105 scons: .* is up to date.
106 scons: .* is up to date.
111 test
.write('SConstruct', """
113 env.StaticLibrary('a', 'a.c')
114 env.StaticLibrary('b', 'b.c')
117 test
.write('a.c', '''
122 test
.write('b.c', '''
127 test
.write('a.h', """
131 test
.write('b.h', """
135 test
.run(arguments
='a.lib b.lib')
136 test
.run(arguments
='b.lib a.lib', stdout
=test
.wrap_stdout("""\
137 scons: .* is up to date.
138 scons: .* is up to date.
147 # indent-tabs-mode:nil
149 # vim: set expandtab tabstop=4 shiftwidth=4: