summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2019-09-17 00:22:53 (GMT)
committerGitHub <noreply@github.com>2019-09-17 00:22:53 (GMT)
commit8ebbb422ea567ca49cd3185cd45def21622515a1 (patch)
treeacdfc30ba8089f946363cf8a25ab60411dc57787 /test
parent00aad0861206c19e19cd270fa5935e0e22500332 (diff)
parentf3937a8b0f71fc10e05e81aaaf47824600d3be58 (diff)
downloadSCons-8ebbb422ea567ca49cd3185cd45def21622515a1.zip
SCons-8ebbb422ea567ca49cd3185cd45def21622515a1.tar.gz
SCons-8ebbb422ea567ca49cd3185cd45def21622515a1.tar.bz2
Merge pull request #3444 from mwichmann/depr-debugs
Remove deprecated debug options
Diffstat (limited to 'test')
-rw-r--r--test/Deprecated/debug-dtree.py120
-rw-r--r--test/Deprecated/debug-stree.py139
-rw-r--r--test/Deprecated/debug-tree.py160
-rw-r--r--test/Interactive/tree.py17
-rw-r--r--test/Removed/debug-dtree.py57
-rw-r--r--test/Removed/debug-nomemoizer.py (renamed from test/Deprecated/debug-nomemoizer.py)28
-rw-r--r--test/Removed/debug-stree.py57
-rw-r--r--test/Removed/debug-tree.py64
-rw-r--r--test/option--tree.py7
-rw-r--r--test/packaging/rpm/explicit-target.py2
-rw-r--r--test/packaging/rpm/multipackage.py4
-rw-r--r--test/packaging/rpm/package.py2
12 files changed, 195 insertions, 462 deletions
diff --git a/test/Deprecated/debug-dtree.py b/test/Deprecated/debug-dtree.py
deleted file mode 100644
index 1e7366f..0000000
--- a/test/Deprecated/debug-dtree.py
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that the --debug=dtree option correctly prints just the explicit
-dependencies (sources or Depends()) of a target.
-"""
-
-import TestSCons
-
-test = TestSCons.TestSCons(match = TestSCons.match_re_dotall)
-
-test.write('SConstruct', """
-env = Environment(OBJSUFFIX = '.ooo', PROGSUFFIX = '.xxx')
-env.Program('foo', Split('foo.c bar.c'))
-""")
-
-test.write('foo.c', r"""
-#include <stdio.h>
-#include <stdlib.h>
-#include "foo.h"
-int main(int argc, char *argv[])
-{
- argv[argc++] = "--";
- printf("f1.c\n");
- exit (0);
-}
-""")
-
-test.write('bar.c', """
-#include "bar.h"
-int local = 1;
-""")
-
-test.write('foo.h', """
-#ifndef FOO_H
-#define FOO_H
-#include "bar.h"
-#endif
-""")
-
-test.write('bar.h', """
-#ifndef BAR_H
-#define BAR_H
-#include "foo.h"
-#endif
-""")
-
-expect = """
-scons: warning: The --debug=dtree option is deprecated; please use --tree=derived instead.
-"""
-
-stderr = TestSCons.re_escape(expect) + TestSCons.file_expr
-
-dtree1 = """
-+-foo.xxx
- +-foo.ooo
- +-bar.ooo
-"""
-
-test.run(arguments = "--debug=dtree foo.xxx",
- stderr = stderr)
-test.must_contain_all_lines(test.stdout(), [dtree1])
-
-dtree2 = """
-+-.
- +-bar.ooo
- +-foo.ooo
- +-foo.xxx
- +-foo.ooo
- +-bar.ooo
-"""
-test.run(arguments = "--debug=dtree .",
- stderr = stderr)
-test.must_contain_all_lines(test.stdout(), [dtree2])
-
-# Make sure we print the debug stuff even if there's a build failure.
-test.write('bar.h', """
-#ifndef BAR_H
-#define BAR_H
-#include "foo.h"
-#endif
-THIS SHOULD CAUSE A BUILD FAILURE
-""")
-
-test.run(arguments = "--debug=dtree foo.xxx",
- status = 2,
- stderr = None)
-test.must_contain_all_lines(test.stdout(), [dtree1])
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/Deprecated/debug-stree.py b/test/Deprecated/debug-stree.py
deleted file mode 100644
index 907dedf..0000000
--- a/test/Deprecated/debug-stree.py
+++ /dev/null
@@ -1,139 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that the --debug=stree option prints a dependency tree with output
-that indicates the state of various Node status flags.
-"""
-
-import TestSCons
-
-test = TestSCons.TestSCons(match = TestSCons.match_re_dotall)
-
-CC = test.detect('CC')
-LINK = test.detect('LINK')
-if LINK is None: LINK = CC
-
-test.write('SConstruct', """
-env = Environment(OBJSUFFIX = '.ooo', PROGSUFFIX = '.xxx')
-env.Program('foo', Split('foo.c bar.c'))
-""")
-
-test.write('foo.c', r"""
-#include <stdio.h>
-#include <stdlib.h>
-#include "foo.h"
-int main(int argc, char *argv[])
-{
- argv[argc++] = "--";
- printf("f1.c\n");
- exit (0);
-}
-""")
-
-test.write('bar.c', """
-#include "bar.h"
-int local = 1;
-""")
-
-test.write('foo.h', """
-#ifndef FOO_H
-#define FOO_H
-#include "bar.h"
-#endif
-""")
-
-test.write('bar.h', """
-#ifndef BAR_H
-#define BAR_H
-#include "foo.h"
-#endif
-""")
-
-expect = """
-scons: warning: The --debug=stree option is deprecated; please use --tree=all,status instead.
-"""
-
-stderr = TestSCons.re_escape(expect) + TestSCons.file_expr
-
-stree = """
-[E B C ]+-foo.xxx
-[E B C ] +-foo.ooo
-[E C ] | +-foo.c
-[E C ] | +-foo.h
-[E C ] | +-bar.h
-[E C ] | +-%(CC)s
-[E B C ] +-bar.ooo
-[E C ] | +-bar.c
-[E C ] | +-bar.h
-[E C ] | +-foo.h
-[E C ] | +-%(CC)s
-[E C ] +-%(LINK)s
-""" % locals()
-
-test.run(arguments = "--debug=stree foo.xxx",
- stderr = stderr)
-test.fail_test(test.stdout().count(stree) != 1)
-
-stree2 = """
- E = exists
- R = exists in repository only
- b = implicit builder
- B = explicit builder
- S = side effect
- P = precious
- A = always build
- C = current
- N = no clean
- H = no cache
-
-[ B ]+-foo.xxx
-[ B ] +-foo.ooo
-[E C ] | +-foo.c
-[E C ] | +-foo.h
-[E C ] | +-bar.h
-[E C ] | +-%(CC)s
-[ B ] +-bar.ooo
-[E C ] | +-bar.c
-[E C ] | +-bar.h
-[E C ] | +-foo.h
-[E C ] | +-%(CC)s
-[E C ] +-%(LINK)s
-""" % locals()
-
-test.run(arguments = '-c foo.xxx')
-
-test.run(arguments = "--no-exec --debug=stree foo.xxx",
- stderr = stderr)
-test.fail_test(test.stdout().count(stree2) != 1)
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/Deprecated/debug-tree.py b/test/Deprecated/debug-tree.py
deleted file mode 100644
index 51ff7f2..0000000
--- a/test/Deprecated/debug-tree.py
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that the --debug=tree option prints a tree representation of the
-complete dependencies of a target.
-"""
-
-import TestSCons
-
-test = TestSCons.TestSCons(match = TestSCons.match_re_dotall)
-
-CC = test.detect('CC')
-LINK = test.detect('LINK')
-if LINK is None: LINK = CC
-
-test.write('SConstruct', """
-env = Environment(OBJSUFFIX = '.ooo', PROGSUFFIX = '.xxx')
-env.Program('Foo', Split('Foo.c Bar.c'))
-""")
-
-# N.B.: We use upper-case file names (Foo* and Bar*) so that the sorting
-# order with our upper-case SConstruct file is the same on case-sensitive
-# (UNIX/Linux) and case-insensitive (Windows) systems.
-
-test.write('Foo.c', r"""
-#include <stdio.h>
-#include <stdlib.h>
-#include "Foo.h"
-int main(int argc, char *argv[])
-{
- argv[argc++] = "--";
- printf("f1.c\n");
- exit (0);
-}
-""")
-
-test.write('Bar.c', """
-#include "Bar.h"
-int local = 1;
-""")
-
-test.write('Foo.h', """
-#ifndef FOO_H
-#define FOO_H
-#include "Bar.h"
-#endif
-""")
-
-test.write('Bar.h', """
-#ifndef BAR_H
-#define BAR_H
-#include "Foo.h"
-#endif
-""")
-
-expect = """
-scons: warning: The --debug=tree option is deprecated; please use --tree=all instead.
-"""
-
-stderr = TestSCons.re_escape(expect) + TestSCons.file_expr
-
-tree1 = """
-+-Foo.xxx
- +-Foo.ooo
- | +-Foo.c
- | +-Foo.h
- | +-Bar.h
- | +-%(CC)s
- +-Bar.ooo
- | +-Bar.c
- | +-Bar.h
- | +-Foo.h
- | +-%(CC)s
- +-%(LINK)s
-""" % locals()
-
-test.run(arguments = "--debug=tree Foo.xxx",
- stderr = stderr)
-test.must_contain_all_lines(test.stdout(), tree1)
-
-tree2 = """
-+-.
- +-Bar.c
- +-Bar.h
- +-Bar.ooo
- | +-Bar.c
- | +-Bar.h
- | +-Foo.h
- | +-%(CC)s
- +-Foo.c
- +-Foo.h
- +-Foo.ooo
- | +-Foo.c
- | +-Foo.h
- | +-Bar.h
- | +-%(CC)s
- +-Foo.xxx
- | +-Foo.ooo
- | | +-Foo.c
- | | +-Foo.h
- | | +-Bar.h
- | | +-%(CC)s
- | +-Bar.ooo
- | | +-Bar.c
- | | +-Bar.h
- | | +-Foo.h
- | | +-%(CC)s
- | +-%(LINK)s
- +-SConstruct
-""" % locals()
-
-test.run(arguments = "--debug=tree .",
- stderr = stderr)
-test.must_contain_all_lines(test.stdout(), tree2)
-
-# Make sure we print the debug stuff even if there's a build failure.
-test.write('Bar.h', """
-#ifndef BAR_H
-#define BAR_H
-#include "Foo.h"
-#endif
-THIS SHOULD CAUSE A BUILD FAILURE
-""")
-
-test.run(arguments = "--debug=tree Foo.xxx",
- status = 2,
- stderr = None)
-test.must_contain_all_lines(test.stdout(), tree1)
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/Interactive/tree.py b/test/Interactive/tree.py
index 61faa22..c10962a 100644
--- a/test/Interactive/tree.py
+++ b/test/Interactive/tree.py
@@ -69,23 +69,6 @@ test.must_match(test.workpath('foo.out'), "foo.in 2\n")
-scons.send("build --debug=tree foo.out\n")
-
-expect_stdout = """\
-scons>>> Copy("foo.out", "foo.in")
-scons>>> Touch("1")
-scons>>> Copy("foo.out", "foo.in")
-+-foo.out
- +-foo.in
-scons>>> Touch("2")
-scons>>> scons: `foo.out' is up to date.
-scons>>>
-"""
-
-test.finish(scons, stdout = expect_stdout)
-
-
-
test.pass_test()
# Local Variables:
diff --git a/test/Removed/debug-dtree.py b/test/Removed/debug-dtree.py
new file mode 100644
index 0000000..a016f96
--- /dev/null
+++ b/test/Removed/debug-dtree.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+"""
+Test that the --debug=dtree option fails with expected exception
+"""
+
+import os
+
+import TestSCons
+
+test = TestSCons.TestSCons()
+
+
+test.write('SConstruct', "")
+
+expect = r"""usage: scons [OPTION] [TARGET] ...
+
+SCons Error: `dtree' is not a valid debug option type ; please use --tree=derived instead
+"""
+
+test.run(arguments='-Q --debug=dtree', status=2, stderr=expect)
+
+os.environ['SCONSFLAGS'] = '--debug=dtree'
+test.run(arguments="-H", status=2, stderr=expect)
+
+
+test.pass_test()
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/Deprecated/debug-nomemoizer.py b/test/Removed/debug-nomemoizer.py
index 6d05cb2..a830a88 100644
--- a/test/Deprecated/debug-nomemoizer.py
+++ b/test/Removed/debug-nomemoizer.py
@@ -25,30 +25,28 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
"""
-Test calling the (deprecated) --debug=nomemoizer option.
+Test that the --debug=nomemoizer option fails with expected exception
"""
+import os
+
import TestSCons
-test = TestSCons.TestSCons(match = TestSCons.match_re)
+test = TestSCons.TestSCons()
+
-test.write('SConstruct', """
-def cat(target, source, env):
- with open(str(target[0]), 'wb') as ofp, open(str(source[0]), 'rb') as ifp:
- ofp.write(ifp.read())
-env = Environment(BUILDERS={'Cat':Builder(action=Action(cat))})
-env.Cat('file.out', 'file.in')
-""")
+test.write('SConstruct', "")
-test.write('file.in', "file.in\n")
+expect=r"""usage: scons [OPTION] [TARGET] ...
+
+SCons Error: `nomemoizer' is not a valid debug option type ; there is no replacement
+"""
-expect = """
-scons: warning: The --debug=nomemoizer option is deprecated and has no effect.
-""" + TestSCons.file_expr
+test.run(arguments='-Q --debug=nomemoizer', status=2, stderr=expect)
-test.run(arguments = "--debug=nomemoizer", stderr = expect)
+os.environ['SCONSFLAGS'] = '--debug=nomemoizer'
+test.run(arguments="-H", status=2, stderr=expect)
-test.must_match('file.out', "file.in\n")
test.pass_test()
diff --git a/test/Removed/debug-stree.py b/test/Removed/debug-stree.py
new file mode 100644
index 0000000..60ce4f2
--- /dev/null
+++ b/test/Removed/debug-stree.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+"""
+Test that the --debug=stree option fails with expected exception
+"""
+
+import os
+
+import TestSCons
+
+test = TestSCons.TestSCons()
+
+
+test.write('SConstruct', "")
+
+expect = r"""usage: scons [OPTION] [TARGET] ...
+
+SCons Error: `stree' is not a valid debug option type ; please use --tree=all,status instead
+"""
+
+test.run(arguments='-Q --debug=stree', status=2, stderr=expect)
+
+os.environ['SCONSFLAGS'] = '--debug=stree'
+test.run(arguments="-H", status=2, stderr=expect)
+
+
+test.pass_test()
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/Removed/debug-tree.py b/test/Removed/debug-tree.py
new file mode 100644
index 0000000..06287de
--- /dev/null
+++ b/test/Removed/debug-tree.py
@@ -0,0 +1,64 @@
+#!/usr/bin/env python
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+"""
+Test that the --debug=tree option fails with expected exception
+Check command-line, SCONSFLAGS and interactive
+"""
+
+import os
+
+import TestSCons
+
+test = TestSCons.TestSCons()
+
+
+test.write('SConstruct', "")
+
+expect = r"""usage: scons [OPTION] [TARGET] ...
+
+SCons Error: `tree' is not a valid debug option type ; please use --tree=all instead
+"""
+
+test.run(arguments='-Q --debug=tree', status=2, stderr=expect)
+
+os.environ['SCONSFLAGS'] = '--debug=tree'
+test.run(arguments="-H", status=2, stderr=expect)
+
+
+# moved test from test/Interactive/tree.py
+scons = test.start(arguments = '-Q --interactive')
+scons.send("build --debug=tree\n")
+test.finish(scons, status=2, stderr=expect)
+
+
+test.pass_test()
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/option--tree.py b/test/option--tree.py
index 0bf2c06..1b34176 100644
--- a/test/option--tree.py
+++ b/test/option--tree.py
@@ -45,13 +45,6 @@ SCons Error: `foofoo' is not a valid --tree option type, try:
""",
status=2)
-test.run(arguments='--debug=tree',
- stderr="""
-scons: warning: The --debug=tree option is deprecated; please use --tree=all instead.
-.*
-""",
- status=0, match=TestSCons.match_re_dotall)
-
# Test that unicode characters can be printed (escaped) with the --tree option
test.write('SConstruct',
diff --git a/test/packaging/rpm/explicit-target.py b/test/packaging/rpm/explicit-target.py
index 48b5c83..fba0237 100644
--- a/test/packaging/rpm/explicit-target.py
+++ b/test/packaging/rpm/explicit-target.py
@@ -67,7 +67,7 @@ env.Package( NAME = 'foo',
LICENSE = 'gpl',
SUMMARY = 'balalalalal',
X_RPM_GROUP = 'Application/fu',
- X_RPM_INSTALL = r'%(_python_)s %(scons)s --debug=tree --install-sandbox="$RPM_BUILD_ROOT" "$RPM_BUILD_ROOT"',
+ X_RPM_INSTALL = r'%(_python_)s %(scons)s --tree=all --install-sandbox="$RPM_BUILD_ROOT" "$RPM_BUILD_ROOT"',
DESCRIPTION = 'this should be really really long',
source = [ prog ],
target = "my_rpm_package.rpm",
diff --git a/test/packaging/rpm/multipackage.py b/test/packaging/rpm/multipackage.py
index 2f106f4..4a29a40 100644
--- a/test/packaging/rpm/multipackage.py
+++ b/test/packaging/rpm/multipackage.py
@@ -67,7 +67,7 @@ env.Package( NAME = 'foo',
LICENSE = 'gpl',
SUMMARY = 'balalalalal',
X_RPM_GROUP = 'Application/fu',
- X_RPM_INSTALL = r'%(_python_)s %(scons)s --debug=tree --install-sandbox="$RPM_BUILD_ROOT" "$RPM_BUILD_ROOT"',
+ X_RPM_INSTALL = r'%(_python_)s %(scons)s --tree=all --install-sandbox="$RPM_BUILD_ROOT" "$RPM_BUILD_ROOT"',
DESCRIPTION = 'this should be really really long',
source = [ prog ],
SOURCE_URL = 'http://foo.org/foo-1.2.3.tar.gz'
@@ -80,7 +80,7 @@ env.Package( NAME = 'foo2',
LICENSE = 'gpl',
SUMMARY = 'balalalalal',
X_RPM_GROUP = 'Application/fu',
- X_RPM_INSTALL = r'%(_python_)s %(scons)s --debug=tree --install-sandbox="$RPM_BUILD_ROOT" "$RPM_BUILD_ROOT"',
+ X_RPM_INSTALL = r'%(_python_)s %(scons)s --tree=all --install-sandbox="$RPM_BUILD_ROOT" "$RPM_BUILD_ROOT"',
DESCRIPTION = 'this should be really really long',
source = [ prog ],
)
diff --git a/test/packaging/rpm/package.py b/test/packaging/rpm/package.py
index 23ebe05..0ef5fad 100644
--- a/test/packaging/rpm/package.py
+++ b/test/packaging/rpm/package.py
@@ -66,7 +66,7 @@ env.Package( NAME = 'foo',
LICENSE = 'gpl',
SUMMARY = 'balalalalal',
X_RPM_GROUP = 'Application/fu',
- X_RPM_INSTALL = r'%(_python_)s %(scons)s --debug=tree --install-sandbox="$RPM_BUILD_ROOT" "$RPM_BUILD_ROOT"',
+ X_RPM_INSTALL = r'%(_python_)s %(scons)s --tree=all --install-sandbox="$RPM_BUILD_ROOT" "$RPM_BUILD_ROOT"',
DESCRIPTION = 'this should be really really long',
source = [ prog ],
SOURCE_URL = 'http://foo.org/foo-1.2.3.tar.gz'