diff options
| author | Greg Noel <GregNoel@tigris.org> | 2010-05-28 09:40:40 (GMT) |
|---|---|---|
| committer | Greg Noel <GregNoel@tigris.org> | 2010-05-28 09:40:40 (GMT) |
| commit | 56309561f2396659965eda63b30c69043e17d3f6 (patch) | |
| tree | 2a9eaf225729bc320b75e8f0f5f70872b3a72c8f /test/Deprecated/SourceCode/RCS/RCS_COCOMSTR.py | |
| parent | 1611fe9bdefe760e4fbfd0a4ae85892a3094e19e (diff) | |
| download | SCons-56309561f2396659965eda63b30c69043e17d3f6.zip SCons-56309561f2396659965eda63b30c69043e17d3f6.tar.gz SCons-56309561f2396659965eda63b30c69043e17d3f6.tar.bz2 | |
http://scons.tigris.org/issues/show_bug.cgi?id=2365
Start the deprecation cycle for SourceCode() and its related factory functions.
Deprecation messages are added to the functions. Regression tests are modified
to deal with the messages being generated. Documentation is updated.
Diffstat (limited to 'test/Deprecated/SourceCode/RCS/RCS_COCOMSTR.py')
| -rw-r--r-- | test/Deprecated/SourceCode/RCS/RCS_COCOMSTR.py | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/test/Deprecated/SourceCode/RCS/RCS_COCOMSTR.py b/test/Deprecated/SourceCode/RCS/RCS_COCOMSTR.py index ee3ba15..3626376 100644 --- a/test/Deprecated/SourceCode/RCS/RCS_COCOMSTR.py +++ b/test/Deprecated/SourceCode/RCS/RCS_COCOMSTR.py @@ -20,7 +20,6 @@ # 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__" @@ -34,7 +33,17 @@ import TestSCons _python_ = TestSCons._python_ -test = TestSCons.TestSCons() +test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) + +test.write('SConscript', """ +Environment(tools = ['RCS']).RCS() +""") + +msg_rcs = """The RCS() factory is deprecated and there is no replacement.""" +warn_rcs = test.deprecated_fatal('deprecated-build-dir', msg_rcs) +msg_sc = """SourceCode() has been deprecated and there is no replacement. +\tIf you need this function, please contact dev@scons.tigris.org.""" +warn_sc = test.deprecated_wrap(msg_sc) test.subdir('RCS', ['RCS', 'sub'], 'sub') @@ -56,6 +65,7 @@ for f in sys.argv[1:]: """) test.write('SConstruct', """ +SetOption('warn', 'deprecated-source-code') def cat(env, source, target): target = str(target[0]) f = open(target, "wb") @@ -90,11 +100,11 @@ test.write(['RCS', 'sub', 'ddd.in'], "RCS/sub/ddd.in\n") test.write(['sub', 'eee.in'], "checked-out sub/eee.in\n") test.write(['RCS', 'sub', 'fff.in'], "RCS/sub/fff.in\n") -test.run(arguments = '.', - stdout = test.wrap_stdout(read_str = """\ +read_str = """\ Checking out %(sub_SConscript)s from our fake RCS -""" % locals(), - build_str = """\ +""" % locals() + +build_str = """\ Checking out aaa.in from our fake RCS cat(["aaa.out"], ["aaa.in"]) cat(["bbb.out"], ["bbb.in"]) @@ -107,7 +117,13 @@ cat(["%(sub_eee_out)s"], ["%(sub_eee_in)s"]) Checking out %(sub_fff_in)s from our fake RCS cat(["%(sub_fff_out)s"], ["%(sub_fff_in)s"]) cat(["%(sub_all)s"], ["%(sub_ddd_out)s", "%(sub_eee_out)s", "%(sub_fff_out)s"]) -""" % locals())) +""" % locals() + +stdout = test.wrap_stdout(read_str = read_str, build_str = build_str) + +test.run(arguments = '.', + stdout = TestSCons.re_escape(stdout), + stderr = warn_rcs + warn_sc) test.must_match('all', "RCS/aaa.in\nchecked-out bbb.in\nRCS/ccc.in\n") @@ -116,8 +132,6 @@ test.must_match(['sub', 'all'], "RCS/sub/ddd.in\nchecked-out sub/eee.in\nRCS/sub/fff.in\n") - -# test.pass_test() # Local Variables: |
