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__"
27 Verifies operation of the --interactive command line option
33 test
= TestSCons
.TestSCons()
35 test
.write('SConstruct', """\
36 Command('f1.out', 'f1.in', Copy('$TARGET', '$SOURCE'))
37 Command('f2.out', 'f2.in', Copy('$TARGET', '$SOURCE'))
38 Command('f3.out', 'f3.in', Copy('$TARGET', '$SOURCE'))
39 Command('1', [], Touch('$TARGET'))
40 Command('2', [], Touch('$TARGET'))
41 Command('3', [], Touch('$TARGET'))
44 test
.write('f1.in', "f1.in\n")
45 test
.write('f2.in', "f2.in\n")
46 test
.write('f3.in', "f3.in\n")
50 scons
= test
.start(arguments
= '-Q --interactive')
52 scons
.send("build f1.out f2.out f3.out\n")
54 scons
.send("build 1\n")
56 test
.wait_for(test
.workpath('1'))
58 test
.must_match(test
.workpath('f1.out'), "f1.in\n")
59 test
.must_match(test
.workpath('f2.out'), "f2.in\n")
60 test
.must_match(test
.workpath('f3.out'), "f3.in\n")
64 scons
.send("clean f1.out\n")
66 scons
.send("build 2\n")
68 test
.wait_for(test
.workpath('2'), popen
=scons
)
70 test
.must_not_exist('f1.out')
71 test
.must_exist('f2.out')
72 test
.must_exist('f3.out')
76 scons
.send("build -c\n")
78 scons
.send("build 3\n")
80 test
.wait_for(test
.workpath('3'))
82 test
.must_not_exist('f1.out')
83 test
.must_not_exist('f2.out')
84 test
.must_not_exist('f3.out')
87 scons>>> Copy("f1.out", "f1.in")
88 Copy("f2.out", "f2.in")
89 Copy("f3.out", "f3.in")
91 scons>>> Removed f1.out
101 test
.finish(scons
, stdout
= expect_stdout
)
109 # indent-tabs-mode:nil
111 # vim: set expandtab tabstop=4 shiftwidth=4: