Skip to content

Commit 9e9e8cc

Browse files
committed
C/CXX FLAGS tests: roll back DefaultEnvironment assignment
No longer assign the result of calling DefaultEnvironment to a dummy. Signed-off-by: Mats Wichmann <[email protected]>
1 parent 0b1b43e commit 9e9e8cc

File tree

9 files changed

+20
-20
lines changed

9 files changed

+20
-20
lines changed

CHANGES.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
1515
From John Doe:
1616
- Whatever John Doe did.
1717

18-
From Mats Wichmann:
19-
- Clean up C and C++ FLAGS tests. Tests which use a real compiler
20-
are now more clearly distinguished (-live.py suffix and docstring).
21-
2218
From Bill Prendergast:
2319
- Fixed SCons.Variables.PackageVariable to correctly test the default
2420
setting against both enable & disable strings. (Fixes #4702)
2521
- Extended unittests (crudely) to test for correct/expected response
2622
when default setting is a boolean string.
2723

24+
From Mats Wichmann:
25+
- Clean up C and C++ FLAGS tests. Tests which use a real compiler
26+
are now more clearly distinguished (-live.py suffix and docstring).
27+
2828

2929
RELEASE 4.9.1 - Thu, 27 Mar 2025 11:40:20 -0700
3030

test/CC/CCFLAGS-live.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
barflags = '-DBAR'
5050

5151
test.write('SConstruct', f"""\
52-
_ = DefaultEnvironment(tools=[])
52+
DefaultEnvironment(tools=[])
5353
foo = Environment(CCFLAGS='{fooflags}')
5454
bar = Environment(CCFLAGS='{barflags}')
5555
@@ -91,7 +91,7 @@
9191
""")
9292

9393
test.write('SConstruct', f"""\
94-
_ = DefaultEnvironment(tools=[])
94+
DefaultEnvironment(tools=[])
9595
bar = Environment(CCFLAGS='{barflags}')
9696
9797
foo_obj = bar.Object(target='foo', source='prog.c')

test/CC/CFLAGS-live.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
# Make sure CFLAGS is not passed to CXX by just expanding CXXCOM
3939
test.write('SConstruct', """\
40-
_ = DefaultEnvironment(tools=[])
40+
DefaultEnvironment(tools=[])
4141
env = Environment(CFLAGS='-xyz', CCFLAGS='-abc')
4242
print(env.subst('$CXXCOM'))
4343
print(env.subst('$CXXCOMSTR'))
@@ -63,7 +63,7 @@
6363
barflags = '-DBAR'
6464

6565
test.write('SConstruct', f"""\
66-
_ = DefaultEnvironment(tools=[])
66+
DefaultEnvironment(tools=[])
6767
foo = Environment(CFLAGS="{fooflags}")
6868
bar = Environment(CFLAGS="{barflags}")
6969
@@ -105,7 +105,7 @@
105105
""")
106106

107107
test.write('SConstruct', f"""\
108-
_ = DefaultEnvironment(tools=[])
108+
DefaultEnvironment(tools=[])
109109
bar = Environment(CFLAGS='{barflags}')
110110
111111
foo_obj = bar.Object(target='foo', source='prog.c')

test/CC/SHCCFLAGS-live.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
os.environ['LD_LIBRARYN32_PATH'] = '.'
4747

4848
test.write('SConstruct', f"""\
49-
_ = DefaultEnvironment(tools=[])
49+
DefaultEnvironment(tools=[])
5050
foo = Environment(SHCCFLAGS='{fooflags}', WINDOWS_INSERT_DEF=1)
5151
bar = Environment(SHCCFLAGS='{barflags}', WINDOWS_INSERT_DEF=1)
5252
@@ -113,7 +113,7 @@
113113
test.run(program=test.workpath('barprog'), stdout="prog.c: BAR\n")
114114

115115
test.write('SConstruct', f"""\
116-
_ = DefaultEnvironment(tools=[])
116+
DefaultEnvironment(tools=[])
117117
bar = Environment(SHCCFLAGS='{barflags}', WINDOWS_INSERT_DEF=1)
118118
119119
foo_obj = bar.SharedObject(target='foo', source='prog.c')

test/CC/SHCFLAGS-live.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
os.environ['LD_LIBRARYN32_PATH'] = '.'
4747

4848
test.write('SConstruct', f"""\
49-
_ = DefaultEnvironment(tools=[])
49+
DefaultEnvironment(tools=[])
5050
foo = Environment(SHCFLAGS='{fooflags}', WINDOWS_INSERT_DEF=1)
5151
bar = Environment(SHCFLAGS='{barflags}', WINDOWS_INSERT_DEF=1)
5252
@@ -113,7 +113,7 @@
113113
test.run(program=test.workpath('barprog'), stdout="prog.c: BAR\n")
114114

115115
test.write('SConstruct', f"""\
116-
_ = DefaultEnvironment(tools=[])
116+
DefaultEnvironment(tools=[])
117117
bar = Environment(SHCFLAGS='{barflags}', WINDOWS_INSERT_DEF=1)
118118
119119
foo_obj = bar.SharedObject(target='foo', source='prog.c')

test/CXX/CCFLAGS-live.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
test = TestSCons.TestSCons()
3636

3737
test.write('SConstruct', """\
38-
_ = DefaultEnvironment(tools=[])
38+
DefaultEnvironment(tools=[])
3939
foo = Environment()
4040
foo.Append(CCFLAGS='-DFOO', CXXFLAGS='-DCXX')
4141
bar = Environment()

test/CXX/CXXFLAGS-live.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
e = test.Environment()
4646

4747
test.write('SConstruct', """\
48-
_ = DefaultEnvironment(tools=[])
48+
DefaultEnvironment(tools=[])
4949
foo = Environment(WINDOWS_INSERT_DEF=1)
5050
foo.Append(CXXFLAGS='-DFOO')
5151
bar = Environment(WINDOWS_INSERT_DEF=1)
@@ -138,7 +138,7 @@
138138
test.run(program=test.workpath('bar'), stdout="prog.c: BAR\n")
139139

140140
test.write('SConstruct', """\
141-
_ = DefaultEnvironment(tools=[])
141+
DefaultEnvironment(tools=[])
142142
bar = Environment(WINDOWS_INSERT_DEF=1)
143143
bar.Append(CXXFLAGS='-DBAR')
144144

test/CXX/SHCCFLAGS-live.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
os.environ['LD_LIBRARYN32_PATH'] = '.'
4747

4848
test.write('SConstruct', f"""\
49-
_ = DefaultEnvironment(tools=[])
49+
DefaultEnvironment(tools=[])
5050
foo = Environment(SHCCFLAGS='{fooflags}', WINDOWS_INSERT_DEF=1)
5151
bar = Environment(SHCCFLAGS='{barflags}', WINDOWS_INSERT_DEF=1)
5252
@@ -113,7 +113,7 @@
113113
test.run(program=test.workpath('barprog'), stdout="prog.cpp: BAR\n")
114114

115115
test.write('SConstruct', f"""\
116-
_ = DefaultEnvironment(tools=[])
116+
DefaultEnvironment(tools=[])
117117
bar = Environment(SHCCFLAGS='{barflags}', WINDOWS_INSERT_DEF=1)
118118
119119
foo_obj = bar.SharedObject(target='foo', source='prog.cpp')

test/CXX/SHCXXFLAGS-live.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
os.environ['LD_LIBRARYN32_PATH'] = '.'
4747

4848
test.write('SConstruct', f"""\
49-
_ = DefaultEnvironment(tools=[])
49+
DefaultEnvironment(tools=[])
5050
foo = Environment(SHCXXFLAGS='{fooflags}', WINDOWS_INSERT_DEF=1)
5151
bar = Environment(SHCXXFLAGS='{barflags}', WINDOWS_INSERT_DEF=1)
5252
@@ -113,7 +113,7 @@
113113
test.run(program=test.workpath('barprog'), stdout="prog.cpp: BAR\n")
114114

115115
test.write('SConstruct', f"""\
116-
_ = DefaultEnvironment(tools=[])
116+
DefaultEnvironment(tools=[])
117117
bar = Environment(SHCXXFLAGS='{barflags}', WINDOWS_INSERT_DEF=1)
118118
119119
foo_obj = bar.SharedObject(target='foo', source='prog.cpp')

0 commit comments

Comments
 (0)