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/Subversion.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/Subversion.py')
| -rw-r--r-- | test/Deprecated/SourceCode/Subversion.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Deprecated/SourceCode/Subversion.py b/test/Deprecated/SourceCode/Subversion.py index 01a12f6..a97c86f 100644 --- a/test/Deprecated/SourceCode/Subversion.py +++ b/test/Deprecated/SourceCode/Subversion.py @@ -32,6 +32,16 @@ import TestSCons test = TestSCons.TestSCons() +test.write('SConscript', """ +Environment(tools = ['Subversion']).Subversion('') +""") + +msg_svn = """The Subversion() factory is deprecated and there is no replacement.""" +warn_svn = test.deprecated_fatal('deprecated-build-dir', msg_svn) +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) + svn = test.where_is('svn') if not svn: test.skip_test("Could not find 'svn'; skipping test(s).\n") @@ -73,6 +83,7 @@ test.run(chdir = 'import', # Test the most straightforward Subversion checkouts, using the module name. test.write(['work1', 'SConstruct'], """ +SetOption('warn', 'deprecated-source-code') def cat(env, source, target): target = str(target[0]) f = open(target, "wb") @@ -120,6 +131,7 @@ test.fail_test(test.read(['work1', 'foo', 'sub', 'all']) != "import/sub/ddd.in\n # Test Subversion checkouts when the module name is specified. test.write(['work2', 'SConstruct'], """ +SetOption('warn', 'deprecated-source-code') def cat(env, source, target): target = str(target[0]) f = open(target, "wb") |
