SCons / test / NodeOps.py

Diff from to

test/NodeOps.py

 
 test = TestSCons.TestSCons()
 
-e = test.Environment()
-fooflags = e['SHCXXFLAGS'] + ' -DFOO'
-barflags = e['SHCXXFLAGS'] + ' -DBAR'
-
 test.subdir('bld', 'src', ['src', 'subsrcdir'])
 
 sconstruct = r"""
-foo = Environment(SHOBJPREFIX='', SHCXXFLAGS = '%(fooflags)s', WINDOWS_INSERT_DEF=1)
-bar = Environment(SHOBJPREFIX='', SHCXXFLAGS = '%(barflags)s', WINDOWS_INSERT_DEF=1)
+foo = Environment(SHOBJPREFIX='', WINDOWS_INSERT_DEF=1)
+foo.Append(SHCXXFLAGS = '-DFOO')
+bar = Environment(SHOBJPREFIX='', WINDOWS_INSERT_DEF=1)
+bar.Append(SHCXXFLAGS = '-DBAR')
 src = Dir('src')
 VariantDir('bld', src, duplicate=1)
 Nodes=[]
 goo_obj = gooMain.Object(target='goomain', source='main.c')
 gooMain.Program(target='gooprog', source=goo_obj)
 """
-           
 
 test.write('foo.def', r"""
 LIBRARY        "foo"
-DESCRIPTION    "Foo Shared Library"
 
 EXPORTS
    doIt
 
 test.write('bar.def', r"""
 LIBRARY        "bar"
-DESCRIPTION    "Bar Shared Library"
 
 EXPORTS
    doIt
             import sys
             sys.stderr.write('VariantDir exists() population did not occur! (%%s:%%s,%%s,%%s)\n'%%(str(node),before,via_node,after))
             sys.exit(-2)
-    
-goo = Environment(CPPFLAGS = '%(fooflags)s')
+
+goo = Environment()
+goo.Append(CFLAGS = '-DFOO')
 goof_in = File('goof.in')
 if %(_E)s:
     exists_test(goof_in)
 """)
 
 test.write('main.c', r"""
-
 void doIt();
 
 int
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.