Permalink
Browse files

Merge of accumulated branches/core changes to sigrefactor.

Some code clean up still to come, but this gets functionality captured
and in sync.

All tests pass (using Python 1.5.2 on Linux) except
test/Errors/preparation.py.
  • Loading branch information...
1 parent 8c75f99 commit f473e4d2ed137194c848ee5df947388ab6305df6 Steven Knight committed Apr 17, 2007
Showing 763 changed files with 35,596 additions and 9,279 deletions.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -8,105 +8,113 @@ see the document HOWTO/release.txt.
Things to do to release a new X.Y.Z version of SCons:
- START THE NEW SUB-BRANCH FOR SUBRELEASE
+ BEFORE STARTING THE SUB-BRANCH:
+
+ Update the user's guide on the parent
- aenbr -p scons.0{94} {1}
+ sh bin/docdiff
- aenc -p scons.0.{94}.{1}
+ sh bin/docupdate
- Call it something like,
- "Prepare a new sub-release for XYZ."
- Cause = internal_enhancement.
- Exempt it from all tests (*_exempt = true).
+ START THE NEW SUB-BRANCH FOR SUBRELEASE
- ae_p scons.0.{94}.{1}
+ aenbr -p scons.0.{94} {1}
- aedb 100
+ aenc -p scons.0.{94}.{1}
- aecd
+ Call it something like,
+ "Prepare a new sub-release for XYZ."
+ Cause = internal_enhancement.
+ Exempt it from all tests (*_exempt = true).
- # Change the hard-coded package version numbers
- # in the following files.
- aecp README
- vi README
+ ae_p scons.0.{94}.{1}
- aecp SConstruct
- vi SConstruct
+ aedb 100
- aecp rpm/scons.spec.in
- vi rpm/scons.spec.in
+ aecd
- aecp src/setup.py
- vi src/setup.py
+ # Change the hard-coded package version numbers
+ # in the following files.
+ aecp README
+ vi README
- aecp src/test_setup.py
- vi src/test_setup.py
+ aecp SConstruct
+ vi SConstruct
- # Read through and update the README files if necessary
- [optional] aecp README
- [optional] vi README
+ aecp rpm/scons.spec.in
+ vi rpm/scons.spec.in
- [optional] aecp src/README.txt
- [optional] vi src/README.txt
+ aecp src/setup.py
+ vi src/setup.py
- # Prepare src/CHANGES.txt
- aecp src/CHANGES.txt
- vi src/CHANGES.txt
+ aecp QMTest/TestSCons.py
+ vi QMTest/TestSCons.py
- change the release line to reflect
- the new subrelease
+ # Read through and update the README files if necessary
+ [optional] aecp README
+ [optional] vi README
- date -R the new subrelease
+ [optional] aecp src/README.txt
+ [optional] vi src/README.txt
- add an explanatory not after the subrelease line:
+ # Prepare src/CHANGES.txt
+ aecp src/CHANGES.txt
+ vi src/CHANGES.txt
- NOTE: This is a pre-release of 0.{95}
- for testing purposes. When 0.{95} is
- released, all these changes will show
- up as 0.95 changes.
+ change the release line to reflect
+ the new subrelease
- # Prepare src/RELEASE.txt
- aecp src/RELEASE.txt
- vi src/RELEASE.txt
+ date -R the new subrelease
- date -R the release only if necessary
+ add an explanatory not after the subrelease line:
- Read through and edit appropriately.
+ NOTE: This is a pre-release of 0.{95}
+ for testing purposes. When 0.{95} is
+ released, all these changes will show
+ up as 0.95 changes.
- Can probably keep most of the existing text
+ # Prepare src/RELEASE.txt
+ aecp src/RELEASE.txt
+ vi src/RELEASE.txt
- Add any new known problems
+ date -R the release only if necessary
- # Prepare debian/changelog
- aecp debian/changelog
- vi debian/changelog
+ Read through and edit appropriately.
- add the new subrelease
+ Can probably keep most of the existing text
- date -R the new subrelease
+ Add any new known problems
- # Now build and prepare the release itself.
- aeb
+ # Prepare debian/changelog
+ aecp debian/changelog
+ vi debian/changelog
- aet -reg
+ add the new subrelease
- aed
+ date -R the new subrelease
- aede
+ # Now build and prepare the release itself.
+ aeb
- etc.
+ aet -reg
+ aed
+ aede
- Make the relevant packages available for by-hand pickup directly
- off the web site:
+ etc.
- scp scons-0.{94}.{1}.tar.gz stevenknight@scons.sourceforge.net:/home/groups/s/sc/scons/htdocs
- scp scons-0.{94}.{1}.zip stevenknight@scons.sourceforge.net:/home/groups/s/sc/scons/htdocs
- Test downloading from the web site.
+ Make the relevant packages available for by-hand pickup directly
+ off the web site:
+ scp scons-0.{94}.{1}.tar.gz stevenknight@scons.sourceforge.net:/home/groups/s/sc/scons/htdocs
+ scp scons-0.{94}.{1}.zip stevenknight@scons.sourceforge.net:/home/groups/s/sc/scons/htdocs
- Announce to dev@scons.tigris.org.
+ Test downloading from the web site.
+
+
+
+ Announce to dev@scons.tigris.org.
View
@@ -27,7 +27,7 @@
import os.path
-Import('env')
+Import('build_dir', 'env')
files = [
'classes.qmc',
@@ -37,6 +37,8 @@ files = [
'TestCommon.py',
'TestRuntest.py',
'TestSCons.py',
+ 'TestSConsign.py',
+ 'TestSCons_time.py',
'unittest.py',
]
@@ -49,9 +51,10 @@ for file in files:
# Guarantee that real copies of these files always exist in
# build/QMTest. If there's a symlink there, then this is an Aegis
# build and we blow them away now so that they'll get "built" later.
- p = os.path.join('build', 'QMTest', file)
+ p = os.path.join(build_dir, 'QMTest', file)
if os.path.islink(p):
os.unlink(p)
- sp = '#' + p
- env.Command(sp, file, copy)
- Local(sp)
+ if not os.path.isabs(p):
+ p = '#' + p
+ env.Command(p, file, copy)
+ Local(p)
View
@@ -176,8 +176,8 @@
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
__author__ = "Steven Knight <knight at baldmt dot com>"
-__revision__ = "TestCmd.py 0.22.D001 2006/02/26 15:45:18 knight"
-__version__ = "0.22"
+__revision__ = "TestCmd.py 0.23.D001 2006/11/30 13:57:29 knight"
+__version__ = "0.23"
import os
import os.path
@@ -193,9 +193,17 @@
import types
import UserList
-__all__ = [ 'fail_test', 'no_result', 'pass_test',
- 'match_exact', 'match_re', 'match_re_dotall',
- 'python_executable', 'TestCmd' ]
+__all__ = [
+ 'diff_re',
+ 'fail_test',
+ 'no_result',
+ 'pass_test',
+ 'match_exact',
+ 'match_re',
+ 'match_re_dotall',
+ 'python_executable',
+ 'TestCmd'
+]
def is_List(e):
return type(e) is types.ListType \
@@ -362,6 +370,31 @@ def match_re_dotall(lines = None, res = None):
if re.compile("^" + res + "$", re.DOTALL).match(lines):
return 1
+def diff_re(a, b, fromfile='', tofile='',
+ fromfiledate='', tofiledate='', n=3, lineterm='\n'):
+ """
+ A simple "diff" of two sets of lines when the expected lines
+ are regular expressions. This is a really dumb thing that
+ just compares each line in turn, so it doesn't look for
+ chunks of matching lines and the like--but at least it lets
+ you know exactly which line first didn't compare correctl...
+ """
+ result = []
+ diff = len(a) - len(b)
+ if diff < 0:
+ a = a + ['']*(-diff)
+ elif diff > 0:
+ b = b + ['']*diff
+ i = 0
+ for aline, bline in zip(a, b):
+ if not re.compile("^" + aline + "$").search(bline):
+ result.append("%sc%s" % (i+1, i+1))
+ result.append('< ' + repr(a[i]))
+ result.append('---')
+ result.append('> ' + repr(b[i]))
+ i = i+1
+ return result
+
if os.name == 'java':
python_executable = os.path.join(sys.prefix, 'jython')
View
@@ -80,8 +80,8 @@
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
__author__ = "Steven Knight <knight at baldmt dot com>"
-__revision__ = "TestCommon.py 0.22.D001 2006/02/26 15:45:18 knight"
-__version__ = "0.22"
+__revision__ = "TestCommon.py 0.23.D001 2006/11/30 13:57:29 knight"
+__version__ = "0.23"
import os
import os.path
View
@@ -27,9 +27,11 @@
__all__.extend([ 'TestRuntest',
'python',
+ '_python_',
])
python = python_executable
+_python_ = '"' + python_executable + '"'
failing_test_template = """\
@@ -53,6 +55,22 @@
sys.exit(0)
"""
+fake_scons_py = """
+__version__ = '1.2.3'
+__build__ = 'D123'
+__buildsys__ = 'fake_system'
+__date__ = 'Jan 1 1970'
+__developer__ = 'Anonymous'
+"""
+
+fake___init___py = """
+__version__ = '4.5.6'
+__build__ = 'D456'
+__buildsys__ = 'another_fake_system'
+__date__ = 'Dec 31 1999'
+__developer__ = 'John Doe'
+"""
+
class TestRuntest(TestCommon):
"""Class for testing the runtest.py script.
@@ -91,15 +109,28 @@ def __init__(self, **kw):
kw['match'] = match_exact
if not kw.has_key('workdir'):
kw['workdir'] = ''
+
+ try:
+ noqmtest = kw['noqmtest']
+ except KeyError:
+ noqmtest = 0
+ else:
+ del kw['noqmtest']
+
orig_cwd = os.getcwd()
apply(TestCommon.__init__, [self], kw)
+
+ if not noqmtest:
+ qmtest_py = self.where_is('qmtest.py')
+ if not qmtest_py:
+ self.skip_test("Could not find 'qmtest.py'; skipping test(s).\n")
things_to_copy = [
'runtest.py',
'QMTest',
]
- dirs = [orig_cwd]
+ dirs = [os.environ.get('SCONS_RUNTEST_DIR', orig_cwd)]
spe = os.environ.get('SCONS_SOURCE_PATH_EXECUTABLE', orig_cwd)
for d in string.split(spe, os.pathsep):
@@ -127,6 +158,47 @@ def __init__(self, **kw):
os.environ['PYTHONPATH'] = ''
os.environ['SCONS_SOURCE_PATH_EXECUTABLE'] = ''
+ def skip_test(self, message="Skipping test.\n"):
+ """Skips a test.
+
+ Proper test-skipping behavior is dependent on whether we're being
+ executed as part of development of a change under Aegis.
+
+ Technically, skipping a test is a NO RESULT, but Aegis will
+ treat that as a test failure and prevent the change from going
+ to the next step. We don't want to force anyone using Aegis
+ to have to install absolutely every tool used by the tests,
+ so we actually report to Aegis that a skipped test has PASSED
+ so that the workflow isn't held up.
+ """
+ if message:
+ sys.stdout.write(message)
+ sys.stdout.flush()
+ devdir = os.popen("aesub '$dd' 2>/dev/null", "r").read()[:-1]
+ intdir = os.popen("aesub '$intd' 2>/dev/null", "r").read()[:-1]
+ if devdir and self._cwd[:len(devdir)] == devdir or \
+ intdir and self._cwd[:len(intdir)] == intdir:
+ # We're under the development directory for this change,
+ # so this is an Aegis invocation; pass the test (exit 0).
+ self.pass_test()
+ else:
+ # skip=1 means skip this function when showing where this
+ # result came from. They only care about the line where the
+ # script called test.skip_test(), not the line number where
+ # we call test.no_result().
+ self.no_result(skip=1)
+
+ def write_fake_scons_source_tree(self):
+ os.mkdir('src')
+ os.mkdir('src/script')
+ self.write('src/script/scons.py', fake_scons_py)
+
+ os.mkdir('src/engine')
+ os.mkdir('src/engine/SCons')
+ self.write('src/engine/SCons/__init__.py', fake___init___py)
+ os.mkdir('src/engine/SCons/Script')
+ self.write('src/engine/SCons/Script/__init__.py', fake___init___py)
+
def write_failing_test(self, name):
self.write(name, failing_test_template)
Oops, something went wrong.

0 comments on commit f473e4d

Please sign in to comment.