Small docstring update for vars.Add
[scons.git] / test / Interactive / option--Q.py
blob19b70c1c01d58b8410c96ae50cf2515ee54e8ba0
1 #!/usr/bin/env python
3 # __COPYRIGHT__
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.
24 __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
26 """
27 Verify that use of the -Q option on an individual "build" command
28 will suppress the progress messages.
29 """
31 import TestSCons
33 test = TestSCons.TestSCons()
35 test.write('SConstruct', """\
36 Command('foo.out', 'foo.in', Copy('$TARGET', '$SOURCE'))
37 Command('1', [], Touch('$TARGET'))
38 Command('2', [], Touch('$TARGET'))
39 """)
41 test.write('foo.in', "foo.in 1\n")
45 scons = test.start(arguments = '--interactive')
47 scons.send("build foo.out 1\n")
49 test.wait_for(test.workpath('1'))
51 test.must_match(test.workpath('foo.out'), "foo.in 1\n")
55 test.write('foo.in', "foo.in 2\n")
57 scons.send("build -Q foo.out 2\n")
59 test.wait_for(test.workpath('2'))
61 test.must_match(test.workpath('foo.out'), "foo.in 2\n")
65 expect_stdout = """\
66 scons: Reading SConscript files ...
67 scons: done reading SConscript files.
68 scons>>> scons: Building targets ...
69 Copy("foo.out", "foo.in")
70 Touch("1")
71 scons: done building targets.
72 scons: Clearing cached node information ...
73 scons: done clearing node information.
74 scons>>> Copy("foo.out", "foo.in")
75 Touch("2")
76 scons>>>
77 """
79 test.finish(scons, stdout = expect_stdout)
83 test.pass_test()
85 # Local Variables:
86 # tab-width:4
87 # indent-tabs-mode:nil
88 # End:
89 # vim: set expandtab tabstop=4 shiftwidth=4: