Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit f473e4d2ed137194c848ee5df947388ab6305df6 1 parent 8c75f99
Steven Knight authored
Showing with 16,648 additions and 4,342 deletions.
  1. +340 −253 HOWTO/release.txt
  2. +70 −62 HOWTO/subrelease.txt
  3. +8 −5 QMTest/SConscript
  4. +38 −5 QMTest/TestCmd.py
  5. +2 −2 QMTest/TestCommon.py
  6. +73 −1 QMTest/TestRuntest.py
  7. +61 −11 QMTest/TestSCons.py
  8. +365 −0 QMTest/TestSCons_time.py
  9. +74 −0 QMTest/TestSConsign.py
  10. +1 −0  QMTest/classes.qmc
  11. +149 −70 QMTest/scons_tdb.py
  12. +61 −40 README
  13. +74 −53 SConstruct
  14. +204 −0 bin/ae-cvs-ci
  15. +240 −0 bin/ae-svn-ci
  16. +90 −0 bin/caller-tree.py
  17. +0 −26 bin/check
  18. +149 −65 bin/scons-cdist
  19. +189 −0 bin/scons-diff.py
  20. +1 −1  bin/scons-proc.py
  21. +7 −4 bin/sconsoutput.py
  22. +149 −38 bootstrap.py
  23. +14 −3 config
  24. +2 −2 debian/changelog
  25. +2 −2 debian/control
  26. +0 −1  debian/dirs
  27. +4 −2 debian/postinst
  28. +6 −4 debian/rules
  29. +78 −17 doc/SConscript
  30. +9 −0 doc/developer/MANIFEST
  31. +9 −21 doc/{user/cons.sgml → developer/architecture.sgml}
  32. +40 −0 doc/developer/branches.sgml
  33. +3 −23 doc/{user/cons.in → developer/copyright.sgml}
  34. +40 −0 doc/developer/cycle.sgml
  35. +107 −0 doc/developer/main.sgml
  36. +40 −0 doc/developer/packaging.sgml
  37. +175 −0 doc/developer/preface.sgml
  38. +40 −0 doc/developer/sourcetree.sgml
  39. +40 −0 doc/developer/testing.sgml
  40. +1,005 −0 doc/man/scons-time.1
  41. +687 −88 doc/man/scons.1
  42. +1 −1  doc/man/sconsign.1
  43. +18 −0 doc/scons.mod
  44. +1 −1  doc/user/ENV.sgml
  45. +0 −1  doc/user/MANIFEST
  46. +7 −7 doc/user/alias.sgml
  47. +25 −25 doc/user/builders-built-in.in
  48. +27 −27 doc/user/builders-built-in.sgml
  49. +4 −4 doc/user/builders-writing.in
  50. +5 −5 doc/user/builders-writing.sgml
  51. +228 −7 doc/user/caching.in
  52. +227 −18 doc/user/caching.sgml
  53. +59 −59 doc/user/command-line.sgml
  54. +1 −1  doc/user/copyright.in
  55. +1 −1  doc/user/copyright.sgml
  56. +142 −39 doc/user/depends.in
  57. +159 −55 doc/user/depends.sgml
  58. +51 −11 doc/user/environments.in
  59. +67 −27 doc/user/environments.sgml
  60. +2 −2 doc/user/factories.in
  61. +2 −2 doc/user/factories.sgml
  62. +95 −20 doc/user/file-removal.in
  63. +81 −20 doc/user/file-removal.sgml
  64. +20 −5 doc/user/hierarchy.in
  65. +35 −20 doc/user/hierarchy.sgml
  66. +7 −7 doc/user/install.sgml
  67. +15 −15 doc/user/less-simple.sgml
  68. +14 −14 doc/user/libraries.sgml
  69. +53 −18 doc/user/main.in
  70. +53 −18 doc/user/main.sgml
  71. +19 −4 doc/user/nodes.in
  72. +23 −9 doc/user/nodes.sgml
  73. +2 −2 doc/user/preface.in
  74. +4 −4 doc/user/preface.sgml
  75. +255 −121 doc/user/repositories.in
  76. +243 −122 doc/user/repositories.sgml
  77. +15 −0 doc/user/sconf.in
  78. +15 −0 doc/user/sconf.sgml
  79. +3 −3 doc/user/separate.in
  80. +7 −7 doc/user/separate.sgml
  81. +5 −5 doc/user/simple.sgml
  82. +4 −4 doc/user/sourcecode.sgml
  83. +1 −1  doc/user/tools.in
  84. +1 −1  doc/user/tools.sgml
  85. +567 −4 doc/user/troubleshoot.in
  86. +834 −54 doc/user/troubleshoot.sgml
  87. +3 −3 doc/user/variants.sgml
  88. +2 −1  rpm/scons.spec.in
  89. +181 −134 runtest.py
  90. +449 −1 src/CHANGES.txt
  91. +54 −1 src/RELEASE.txt
  92. +8 −0 src/engine/MANIFEST.in
  93. +16 −30 src/engine/SCons/Action.py
  94. +48 −32 src/engine/SCons/ActionTests.py
  95. +156 −160 src/engine/SCons/Builder.py
  96. +43 −53 src/engine/SCons/BuilderTests.py
  97. +0 −1  src/engine/SCons/Conftest.py
  98. +15 −13 src/engine/SCons/Debug.py
  99. +115 −22 src/engine/SCons/Defaults.py
  100. +218 −127 src/engine/SCons/Environment.py
  101. +204 −59 src/engine/SCons/EnvironmentTests.py
  102. +64 −28 src/engine/SCons/Executor.py
  103. +6 −4 src/engine/SCons/Job.py
  104. +6 −8 src/engine/SCons/JobTests.py
  105. +192 −752 src/engine/SCons/Memoize.py
  106. +192 −0 src/engine/SCons/MemoizeTests.py
  107. +502 −217 src/engine/SCons/Node/FS.py
  108. +116 −91 src/engine/SCons/Node/FSTests.py
  109. +0 −1  src/engine/SCons/Node/NodeTests.py
  110. +22 −6 src/engine/SCons/Node/Python.py
  111. +38 −0 src/engine/SCons/Node/PythonTests.py
  112. +36 −27 src/engine/SCons/Node/__init__.py
  113. +2 −4 src/engine/SCons/Options/BoolOption.py
  114. +4 −2 src/engine/SCons/Options/BoolOptionTests.py
  115. +2 −2 src/engine/SCons/Options/ListOption.py
  116. +0 −3  src/engine/SCons/Options/ListOptionTests.py
  117. +13 −0 src/engine/SCons/Options/OptionsTests.py
  118. +6 −8 src/engine/SCons/Options/PackageOption.py
  119. +3 −2 src/engine/SCons/Options/PackageOptionTests.py
  120. +10 −5 src/engine/SCons/Options/__init__.py
  121. +226 −0 src/engine/SCons/PathList.py
  122. +164 −0 src/engine/SCons/PathListTests.py
  123. +12 −5 src/engine/SCons/Platform/__init__.py
  124. +0 −1  src/engine/SCons/Platform/darwin.py
  125. +3 −3 src/engine/SCons/Platform/posix.py
  126. +26 −6 src/engine/SCons/Platform/win32.py
  127. +8 −3 src/engine/SCons/SConf.py
  128. +10 −4 src/engine/SCons/SConfTests.py
  129. +0 −2  src/engine/SCons/SConsign.py
  130. +23 −6 src/engine/SCons/Scanner/CTests.py
  131. +0 −1  src/engine/SCons/Scanner/D.py
  132. +0 −2  src/engine/SCons/Scanner/Dir.py
  133. +2 −1  src/engine/SCons/Scanner/Fortran.py
  134. +8 −5 src/engine/SCons/Scanner/FortranTests.py
  135. +8 −5 src/engine/SCons/Scanner/IDLTests.py
  136. +64 −8 src/engine/SCons/Scanner/LaTeX.py
  137. +3 −3 src/engine/SCons/Scanner/LaTeXTests.py
  138. +3 −2 src/engine/SCons/Scanner/Prog.py
  139. +5 −5 src/engine/SCons/Scanner/ProgTests.py
  140. +70 −23 src/engine/SCons/Scanner/ScannerTests.py
  141. +52 −48 src/engine/SCons/Scanner/__init__.py
  142. +196 −73 src/engine/SCons/Script/Main.py
  143. +40 −14 src/engine/SCons/Script/SConscript.py
  144. +32 −20 src/engine/SCons/Script/__init__.py
  145. +54 −35 src/engine/SCons/Subst.py
  146. +78 −16 src/engine/SCons/SubstTests.py
  147. +179 −95 src/engine/SCons/Taskmaster.py
  148. +8 −25 src/engine/SCons/TaskmasterTests.py
  149. +2 −2 src/engine/SCons/Tool/386asm.py
  150. +0 −2  src/engine/SCons/Tool/BitKeeper.py
  151. +2 −2 src/engine/SCons/Tool/BitKeeper.xml
  152. +2 −2 src/engine/SCons/Tool/CVS.xml
  153. +28 −12 src/engine/SCons/Tool/JavaCommon.py
  154. +65 −0 src/engine/SCons/Tool/JavaCommonTests.py
  155. +1 −1  src/engine/SCons/Tool/Perforce.xml
  156. +3 −3 src/engine/SCons/Tool/RCS.xml
  157. +1 −1  src/engine/SCons/Tool/SCCS.xml
  158. +2 −0  src/engine/SCons/Tool/ToolTests.py
  159. +28 −6 src/engine/SCons/Tool/__init__.py
  160. +17 −17 src/engine/SCons/Tool/__init__.xml
  161. +6 −6 src/engine/SCons/Tool/applelink.xml
  162. +2 −2 src/engine/SCons/Tool/ar.xml
  163. +4 −0 src/engine/SCons/Tool/as.py
  164. +5 −4 src/engine/SCons/Tool/as.xml
  165. +4 −2 src/engine/SCons/Tool/bcc32.py
  166. +4 −0 src/engine/SCons/Tool/c++.py
  167. +8 −6 src/engine/SCons/Tool/c++.xml
  168. +28 −13 src/engine/SCons/Tool/cc.py
  169. +49 −14 src/engine/SCons/Tool/cc.xml
  170. +0 −1  src/engine/SCons/Tool/cvf.py
  171. +2 −0  src/engine/SCons/Tool/dmd.py
  172. +1 −1  src/engine/SCons/Tool/dvi.py
  173. +5 −5 src/engine/SCons/Tool/dvi.xml
  174. +1 −1  src/engine/SCons/Tool/dvipdf.py
  175. +2 −2 src/engine/SCons/Tool/dvipdf.xml
  176. +3 −1 src/engine/SCons/Tool/dvips.py
  177. +2 −2 src/engine/SCons/Tool/dvips.xml
  178. +1 −0  src/engine/SCons/Tool/f77.py
  179. +33 −33 src/engine/SCons/Tool/f77.xml
  180. +5 −0 src/engine/SCons/Tool/f90.py
  181. +33 −33 src/engine/SCons/Tool/f90.xml
  182. +8 −0 src/engine/SCons/Tool/f95.py
  183. +33 −33 src/engine/SCons/Tool/f95.xml
  184. +2 −1  src/engine/SCons/Tool/fortran.py
  185. +31 −23 src/engine/SCons/Tool/fortran.xml
  186. +2 −2 src/engine/SCons/Tool/gas.py
  187. +1 −1  src/engine/SCons/Tool/gcc.py
  188. +1 −1  src/engine/SCons/Tool/gs.xml
  189. +1 −1  src/engine/SCons/Tool/icc.py
  190. +4 −2 src/engine/SCons/Tool/intelc.py
  191. +4 −1 src/engine/SCons/Tool/jar.py
  192. +2 −2 src/engine/SCons/Tool/jar.xml
  193. +2 −2 src/engine/SCons/Tool/javac.xml
  194. +3 −3 src/engine/SCons/Tool/javah.xml
  195. +1 −1  src/engine/SCons/Tool/latex.py
  196. +2 −2 src/engine/SCons/Tool/latex.xml
  197. +45 −8 src/engine/SCons/Tool/lex.py
  198. +1 −1  src/engine/SCons/Tool/lex.xml
  199. +17 −16 src/engine/SCons/Tool/link.xml
  200. +2 −2 src/engine/SCons/Tool/m4.xml
  201. +3 −3 src/engine/SCons/Tool/mingw.py
  202. +7 −1 src/engine/SCons/Tool/mslink.py
  203. +20 −6 src/engine/SCons/Tool/mslink.xml
  204. +17 −10 src/engine/SCons/Tool/msvc.py
  205. +51 −2 src/engine/SCons/Tool/msvc.xml
  206. +103 −77 src/engine/SCons/Tool/msvs.py
  207. +13 −11 src/engine/SCons/Tool/msvs.xml
  208. +12 −0 src/engine/SCons/Tool/msvsTests.py
  209. +6 −3 src/engine/SCons/Tool/mwcc.py
  210. +2 −2 src/engine/SCons/Tool/mwld.py
  211. +1 −1  src/engine/SCons/Tool/pdf.py
  212. +1 −1  src/engine/SCons/Tool/pdf.xml
  213. +1 −1  src/engine/SCons/Tool/pdflatex.py
  214. +2 −6 src/engine/SCons/Tool/pdftex.py
  215. +7 −10 src/engine/SCons/Tool/qt.py
  216. +20 −16 src/engine/SCons/Tool/qt.xml
  217. +3 −3 src/engine/SCons/Tool/rmic.xml
  218. +4 −4 src/engine/SCons/Tool/rpcgen.xml
  219. +55 −0 src/engine/SCons/Tool/swig.py
  220. +6 −6 src/engine/SCons/Tool/swig.xml
  221. +1 −1  src/engine/SCons/Tool/tar.xml
  222. +71 −19 src/engine/SCons/Tool/tex.py
  223. +3 −3 src/engine/SCons/Tool/tex.xml
  224. +44 −9 src/engine/SCons/Tool/yacc.py
  225. +19 −2 src/engine/SCons/Tool/yacc.xml
  226. +1 −0  src/engine/SCons/Tool/zip.py
  227. +1 −1  src/engine/SCons/Tool/zip.xml
  228. +47 −81 src/engine/SCons/Util.py
  229. +4 −4 src/engine/SCons/UtilTests.py
  230. +10 −3 src/engine/SCons/Warnings.py
  231. +0 −2  src/engine/SCons/__init__.py
  232. +111 −0 src/engine/SCons/compat/__init__.py
  233. +92 −0 src/engine/SCons/compat/_scons_UserString.py
  234. +577 −0 src/engine/SCons/compat/_scons_sets.py
  235. +159 −0 src/engine/SCons/compat/_scons_sets15.py
  236. +1,280 −0 src/engine/SCons/compat/_scons_subprocess.py
  237. +141 −0 src/engine/SCons/compat/builtins.py
  238. +548 −0 src/engine/SCons/cpp.py
  239. +573 −0 src/engine/SCons/cppTests.py
  240. +1 −0  src/script/MANIFEST.in
  241. +76 −0 src/script/scons-post-install.py
Sorry, we could not display the entire diff because too many files (773) changed.
View
593 HOWTO/release.txt
@@ -8,427 +8,514 @@ then see the document HOWTO/subrelease.txt.
Things to do to release a new X.Y version of SCons:
- Prepare the describe-the-release section for the announcements
+ Prepare the describe-the-release section for the announcements
- summarize changes from src/CHANGES.txt
+ summarize changes from src/CHANGES.txt
- template is below, search for "describe-the-release"
+ template is below, search for "describe-the-release"
- send this out for review while you get the rest of the
- release ready!
+ send this out for review while you get the rest of the
+ release ready!
- Build and test candidate packages
+ Build and test candidate packages
- test on Linux
+ test on Linux
- test on Windows NT
+ test on Windows NT
- 1) tar zxf scons-src-{version}.tar.gz
- cd scons-src-{version}
- python runtest.py -a
+ 1) tar zxf scons-src-{version}.tar.gz
+ cd scons-src-{version}
+ python runtest.py -a
- 2) tar zxf scons-{version}.tar.gz
- cd scons-{version}
- python setup.py install
- cd scons-src-{version}
- python runtest.py -a -X -x C:\Python20\scons.bat
+ 2) tar zxf scons-{version}.tar.gz
+ cd scons-{version}
+ python setup.py install
+ cd scons-src-{version}
+ python runtest.py -a -X -x C:\Python20\scons.bat
- 3) scons-{verson}.win32.exe
- cd scons-src-{version}
- python runtest.py -a -X -x C:\Python20\scons.bat
+ 3) scons-{verson}.win32.exe
+ cd scons-src-{version}
+ python runtest.py -a -X -x C:\Python20\scons.bat
- 4) mkdir temporary_directory
- cd temporary_directory
- tar zxf scons-local-{version}.tar.gz
- cd scons-src-{version}
- python runtest.py -a -x C:\temporary_directory\scons.py
+ 4) mkdir temporary_directory
+ cd temporary_directory
+ tar zxf scons-local-{version}.tar.gz
+ cd scons-src-{version}
+ python runtest.py -a -x C:\temporary_directory\scons.py
- Checkin any changes necessary to make everything work
+ Check in any changes necessary to make everything work
- END THE CURRENT DEVELOPMENT BRANCH
+ Update the user's guide
- ae_p scons.0
+ sh bin/docdiff
- aede {96}
+ sh bin/docupdate
- aerpass {96}
+ END THE CURRENT DEVELOPMENT BRANCH
- aeib {96}
+ ae_p scons.0
- aed
+ aede {96}
- aeb
+ aerpass {96}
- aet
+ aeib {96}
- aet -reg
+ aed
- aeipass
+ aeb
- START THE NEW BRANCH FOR RELEASE
+ aet
- aenbr -p scons.0 {97}
+ aet -reg
- aenc -p scons.0.{97}
+ aeipass
- Call it something like,
- "Initialize the new branch for release."
- Cause = internal_enhancement.
- Exempt it from all tests (*_exempt = true).
+ START THE NEW BRANCH FOR RELEASE
- ae_p scons.0.{97}
+ aenbr -p scons.0 {97}
- aedb 100
+ aenc -p scons.0.{97}
- aecd
+ Call it something like,
+ "Initialize the new branch for release."
+ 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.{97}
- aecp SConstruct
- vi SConstruct
+ aedb 100
- aecp rpm/scons.spec.in
- vi rpm/scons.spec.in
+ aecd
- aecp src/test_setup.py
- vi src/test_setup.py
+ # Change the hard-coded package version numbers
+ # in the following files.
+ aecp README
+ vi README
- # Read through and update the README files if necessary
- [optional] aecp README
- [optional] vi README
+ aecp SConstruct
+ vi SConstruct
- [optional] aecp src/README.txt
- [optional] vi src/README.txt
+ aecp rpm/scons.spec.in
+ vi rpm/scons.spec.in
- # Prepare src/CHANGES.txt
- aecp src/CHANGES.txt
- vi src/CHANGES.txt
+ aecp QMTest/TestSCons.py
+ vi QMTest/TestSCons.py
- date -R the latest release
+ # Read through and update the README files if necessary
+ [optional] aecp README
+ [optional] vi README
- should be current if this has been updated
- as each change went in.
+ [optional] aecp src/README.txt
+ [optional] vi src/README.txt
- # Prepare src/RELEASE.txt
- aecp src/RELEASE.txt
- vi src/RELEASE.txt
+ # Prepare src/CHANGES.txt
+ aecp src/CHANGES.txt
+ vi src/CHANGES.txt
- date -R the latest release
+ date -R the latest release
- Read through and edit appropriately.
+ should be current if this has been updated
+ as each change went in.
- 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 latest release
- # Prepare debian/changelog
- aecp debian/changelog
- vi debian/changelog
+ Read through and edit appropriately.
- date -R the latest release
+ Can probably keep most of the existing text
- # Now build and prepare the release itself.
- aeb
+ Add any new known problems
- aed
+ # Prepare debian/changelog
+ aecp debian/changelog
+ vi debian/changelog
- aet -reg
+ date -R the latest release
- aede
+ # Now build and prepare the release itself.
+ aeb
- etc.
+ aed
+ aet -reg
+ aede
- Read through the FAQ for any updates
+ etc.
- Upload the packages to the SourceForge incoming FTP:
+ Read through the FAQ for any updates
- ftp upload.sourceforge.net
- anonymous
- <your email>
- cd incoming
- bin
- put scons-0.{97}-1.noarch.rpm
- put scons-0.{97}-1.src.rpm
- put scons-0.{97}.tar.gz
- put scons-0.{97}.win32.exe
- put scons-0.{97}.zip
- put scons-local-0.{97}.tar.gz
- put scons-local-0.{97}.zip
- put scons-src-0.{97}.tar.gz
- put scons-src-0.{97}.zip
- put scons_0.{97}-1_all.deb
- Create the new release at the SourceForge project page:
- Go to the File Release page
+ Upload the packages to the SourceForge incoming FTP:
- Package Name: scons
+ ftp upload.sourceforge.net
+ anonymous
+ <your email>
+ cd incoming
+ bin
+ put scons-0.{97}-1.noarch.rpm
+ put scons-0.{97}-1.src.rpm
+ put scons-0.{97}.tar.gz
+ put scons-0.{97}.win32.exe
+ put scons-0.{97}.zip
+ put scons-local-0.{97}.tar.gz
+ put scons-local-0.{97}.zip
+ put scons-src-0.{97}.tar.gz
+ put scons-src-0.{97}.zip
+ put scons_0.{97}-1_all.deb
- => Add Release
+ Create the new release at the SourceForge project page:
- New release name: 0.{97}
+ Pull down the "Admin" menu and select "File Releases"
- Cut-and-paste or upload the RELEASE.txt file.
+ Package Name: scons
- Cut-and-paste or upload the CHANGES.txt file.
+ => Add Release
- (If you cut-and-paste, check the "Preserve my
- pre-formatted text." box!)
+ New release name: 0.{97}
- Click "Submit/Refresh" (IMPORTANT!)
+ Upload the RELEASE.txt file.
- Check the SCons files you uploaded
+ Upload the CHANGES.txt file.
- Click "Add Files and/or Refresh View"
+ Check the "Preserve my pre-formatted text." box (IMPORTANT!)
- Edit the file info:
+ Click "Submit/Refresh" (IMPORTANT!)
- scons-0.{97}-1.noarch.rpm Any .rpm
- scons-0.{97}-1.src.rpm Any Source .rpm
- scons-0.{97}.tar.gz Any .gz
- scons-0.{97}.win32.exe i386 .exe (32-bit Windows)
- scons-0.{97}.zip Any .zip
- scons_0.{97}-1_all.deb Any .deb
+ Check the SCons files you uploaded
- Click "Update/Refresh" for each file; this must be done
- one at a time.
+ Click "Add Files and/or Refresh View"
- Check "I'm sure." and click "Send Notice" in the Email
- Release Notice section.
+ Edit the file info:
+ scons-0.{97}-1.noarch.rpm Any .rpm
+ scons-0.{97}-1.src.rpm Any Source .rpm
+ scons-0.{97}.tar.gz Any .gz
+ scons-0.{97}.win32.exe i386 .exe (32-bit Windows)
+ scons-0.{97}.zip Any .zip
+ scons_0.{97}-1_all.deb Any .deb
- Go to the File Release page
+ Click "Update/Refresh" for each file; this must be done
+ one at a time.
- Package Name: scons-local
+ Check "I'm sure." and click "Send Notice" in the Email
+ Release Notice section.
- => Add Release
- New release name: 0.{97}
+ Pull down the "Admin" menu and select "File Releases"
- Cut-and-paste or upload the RELEASE.txt file.
+ Package Name: scons-local
- Cut-and-paste or upload the CHANGES.txt file.
+ => Add Release
- (If you cut-and-paste, check the "Preserve my
- pre-formatted text." box!)
+ New release name: 0.{97}
- Click "Submit/Refresh" (IMPORTANT!)
+ Upload the RELEASE.txt file.
- Check the SCons files you uploaded
+ Upload the CHANGES.txt file.
- Click "Add Files and/or Refresh View"
+ Check the "Preserve my pre-formatted text." box (IMPORTANT!)
- Edit the file info:
+ Click "Submit/Refresh" (IMPORTANT!)
- scons-local-0.{97}.tar.gz Any .gz
- scons-local-0.{97}.zip Any .zip
+ Check the SCons files you uploaded
- Click "Update/Refresh" for each file; this must be done
- one at a time.
+ Click "Add Files and/or Refresh View"
- Check "I'm sure." and click "Send Notice" in the Email
- Release Notice section.
+ Edit the file info:
+ scons-local-0.{97}.tar.gz Any .gz
+ scons-local-0.{97}.zip Any .zip
- Go to the File Release page
+ Click "Update/Refresh" for each file; this must be done
+ one at a time.
- Package Name: scons-src
+ Check "I'm sure." and click "Send Notice" in the Email
+ Release Notice section.
- => Add Release
- New release name: 0.{97}
+ Pull down the "Admin" menu and select "File Releases"
- Cut-and-paste or upload the RELEASE.txt file.
+ Package Name: scons-src
- Cut-and-paste or upload the CHANGES.txt file.
+ => Add Release
- (If you cut-and-paste, check the "Preserve my
- pre-formatted text." box!)
+ New release name: 0.{97}
- Click "Submit/Refresh" (IMPORTANT!)
+ Upload the RELEASE.txt file.
- Check the SCons files you uploaded
+ Upload the CHANGES.txt file.
- Click "Add Files and/or Refresh View"
+ Check the "Preserve my pre-formatted text." box (IMPORTANT!)
- Edit the file info:
+ Click "Submit/Refresh" (IMPORTANT!)
- scons-src-0.{97}.tar.gz Any .gz
- scons-src-0.{97}.zip Any .zip
+ Check the SCons files you uploaded
- Click "Update/Refresh" for each file; this must be done
- one at a time.
+ Click "Add Files and/or Refresh View"
- Check "I'm sure." and click "Send Notice" in the Email
- Release Notice section.
+ Edit the file info:
+ scons-src-0.{97}.tar.gz Any .gz
+ scons-src-0.{97}.zip Any .zip
- Hide release 0.{95} at the SourceForge download page:
+ Click "Update/Refresh" for each file; this must be done
+ one at a time.
- Go to the Admin page
+ Check "I'm sure." and click "Send Notice" in the Email
+ Release Notice section.
- => Edit/Add File Releases
- Package Name: scons
+ Hide release 0.{95} at the SourceForge download page:
- => Edit Releases
+ Pull down the "Admin" menu and select "File Releases"
- Release Name: 0.{95}
+ Package Name: scons
- => Edit This Release
+ => Edit Releases
- Status: => Hidden
+ Release Name: 0.{95}
- Click Submit/Refresh
+ => Edit This Release
+ Status: => Hidden
- Go to the Admin page
+ Click Submit/Refresh
- => Edit/Add File Releases
- Package Name: scons-local
+ Pull down the "Admin" menu and select "File Releases"
- => Edit Releases
+ Package Name: scons-local
- Release Name: 0.{95}
+ => Edit Releases
- => Edit This Release
+ Release Name: 0.{95}
- Status: => Hidden
+ => Edit This Release
- Click Submit/Refresh
+ Status: => Hidden
+ Click Submit/Refresh
- Go to the Admin page
- => Edit/Add File Releases
+ Pull down the "Admin" menu and select "File Releases"
- Package Name: scons-src
+ Package Name: scons-src
- => Edit Releases
+ => Edit Releases
- Release Name: 0.{95}
+ Release Name: 0.{95}
- => Edit This Release
+ => Edit This Release
- Status: => Hidden
+ Status: => Hidden
- Click Submit/Refresh
+ Click Submit/Refresh
- In the Bugs Tracker, add a Group for the new release 0.{97}
+ Add a new release for 0.{97} in the Issue Tracker at tigris.org:
+ Click "Issue Tracker" on the left-hand nav bar
+ Click "Configuration options"
- Test downloading from the SourceForge project page
+ Click "Add/edit components"
- You may need to wait a good bit; they seem to update
- this on half-hour cycles.
+ Under "scons"
+ To the right of "Add ..."
+ Click "Version"
+ At the bottom of the list click "Add"
+ Fill in the "Version:" box with 0.{97}
- Update the web site:
+ Check "Add this version to *all* components."
- template: new version number
+ Click the "Add" button
- src/doc.py: new version number
- src/download.py: new version number
- src/index.py: announcement on the home page
+ Update the scons.org web site:
- src/scons-doc.tar.gz: update
+ svn co http://scons.tigris.org/svn/scons/scons.org
- src/CHANGES.txt: update
+ cd scons.org
- Test downloading from the web site download page
+ CHANGES.txt: copy new version from built source tree
+ download.php: new version number
+ includes/templates.php:
+ update $latestrelease
- Add news item to the SourceForge project page
+ includes/versions.php:
+ update $stablerelease and/or $latestrelease
+ add new version number to $docversions[],
+ IMPORTANT: SHIFT $docversions[] INDEX NUMBERS :-(
+ index.php: announcement on the home page
+ remove out-of-date announcements
+ news-raw.xhtml: add announcement to list (dup from home page)
- Announce to the following mailing lists (template below):
+ RELEASE.txt: copy new version from built source tree
- scons-announce@lists.sourceforge.net
- scons-users@lists.sourceforge.net
- scons-devel@lists.sourceforge.net
+ mkdir doc/0.{97}
- [right away]
+ (cd doc/0.{97} && tar zxf scons-doc-0.{97}.tar.gz)
- python-announce@python.org
+ svn add doc/0.{97}
- [right away, it's moderated and will take
- some time to get through]
+ svn commit
- linux-announce@news.ornl.gov
+ ssh -l scons manam.pair.com
- [right away, it's moderated and will take
- some time to get through]
+ cd public_html
- [optional] cons-discuss@gnu.org
+ mkdir new
- [only if it's a really big announcement,
- I said we wouldn't bug this list]
+ svn co http://scons.tigris.org/svn/scons/scons.org new
- python-list@python.org
+ mv production previous && mv new production
- [wait until business hours so the announcement
- hits mailboxes while U.S. workers are active]
+ [point your browser to http://www.scons.org/]
- Notify Gentoo Linux of the update
- For now, we will do this by entering a bug report, and
- attaching the files in build/gentoo to the report. Go
- to:
+ Update the project pages at tigris.org:
- http://bugs.gentoo.org/
+ svn co http://scons.tigris.org/svn/scons/trunk
- This requires an account (based on your email address)
- and a certain amount of Bugzilla-based navigation,
- but nothing that's too difficult.
+ cd trunk
- This is just my best stab at a process that will work
- for Gentoo. This process may change if the Gentoo
- developers come back and want something submitted in
- some other form.
+ www/project_highlights.html
- Notify www.cmtoday.com/contribute.html
+ www/roadmap.html
- [This guy wants an announcement no more frequently than
- once a month, so save it for a future release if it's
- been too soon since the previous one.]
+ svn commit
- Notify freshmeat.net
- [Wait until the morning so the announcement hits the
- main freshmeat.net page while people in the U.S. are
- awake and working]
+ Test downloading from the SourceForge project page
- Checkin another change to prepare for development on this branch.
+ You may need to wait a good bit; they seem to update
+ this on half-hour cycles.
- # Prep the following files to track the changes
- # made during the next development cycle
- aecp src/CHANGES.txt src/RELEASE.txt
- vi src/CHANGES.txt src/RELEASE.txt
- # Optionally, update release numbers in the following:
- [optional] aecp HOWTO/change.txt
- [optional] vi HOWTO/change.txt
+ Test downloading from the web site download page
- [optional] aecp HOWTO/release.txt
- [optional] vi HOWTO/release.txt
+
+
+ Add news item to the SourceForge project page
+
+ Pull down "Project => News"
+
+ Click "Submit"
+
+ Fill in the "Subject:" box
+
+ Cut-and-paste the announcement text into the "Details:" box
+
+ Click "submit"
+
+
+
+ Add news item to the tigris.org project page
+
+ Click "Announcements"
+
+ Click "Add new announcement"
+
+ Double-check the date (probably already set)
+
+ Fill in the "Headline" box
+
+ Fill in the "Body" box (probably short)
+
+ Click "Add new announcement"
+
+
+
+ Announce to the following mailing lists (template below):
+
+ scons-announce@lists.sourceforge.net
+ scons-users@lists.sourceforge.net
+ scons-devel@lists.sourceforge.net
+
+ [right away]
+
+ python-announce@python.org
+
+ [right away, it's moderated and will take
+ some time to get through]
+
+ linux-announce@news.ornl.gov
+
+ [right away, it's moderated and will take
+ some time to get through]
+
+ [optional] cons-discuss@gnu.org
+
+ [only if it's a really big announcement,
+ I said we wouldn't bug this list]
+
+ python-list@python.org
+
+ [wait until business hours so the announcement
+ hits mailboxes while U.S. workers are active]
+
+ Notify Gentoo Linux of the update
+
+ For now, we will do this by entering a bug report, and
+ attaching the files in build/gentoo to the report. Go
+ to:
+
+ http://bugs.gentoo.org/
+
+ This requires an account (based on your email address)
+ and a certain amount of Bugzilla-based navigation,
+ but nothing that's too difficult.
+
+ This is just my best stab at a process that will work
+ for Gentoo. This process may change if the Gentoo
+ developers come back and want something submitted in
+ some other form.
+
+ Notify www.cmtoday.com/contribute.html
+
+ [This guy wants an announcement no more frequently than
+ once a month, so save it for a future release if it's
+ been too soon since the previous one.]
+
+ Notify freshmeat.net
+
+ [Wait until the morning so the announcement hits the
+ main freshmeat.net page while people in the U.S. are
+ awake and working]
+
+
+
+ Checkin another change to prepare for development on this branch.
+
+ # Prep the following files to track the changes
+ # made during the next development cycle
+ aecp src/CHANGES.txt src/RELEASE.txt
+ vi src/CHANGES.txt src/RELEASE.txt
+
+ # Optionally, update release numbers in the following:
+ [optional] aecp HOWTO/change.txt
+ [optional] vi HOWTO/change.txt
+
+ [optional] aecp HOWTO/release.txt
+ [optional] vi HOWTO/release.txt
@@ -477,18 +564,18 @@ XXX Template describe-the-release section goes here XXX
Special thanks to XXX, XXX, and XXX for their contributions to this
release.
- --SK
+ --SK
=======================
Template scons-users + scons-announce announcement:
Version 0.95 of SCons has been released and is available for download
from the SCons web site:
- http://www.scons.org/
+ http://www.scons.org/
Or through the download link at the SCons project page at SourceForge:
- http://sourceforge.net/projects/scons/
+ http://sourceforge.net/projects/scons/
RPM and Debian packages and a Win32 installer are all available, in
addition to the traditional .tar.gz and .zip files.
@@ -506,7 +593,7 @@ release.
On behalf of the SCons team,
- --SK
+ --SK
=======================
Template python-announce, linux-announce and python-list announcement:
@@ -517,11 +604,11 @@ build tool competition in August 2000.
Version 0.95 of SCons has been released and is available for download
from the SCons web site:
- http://www.scons.org/
+ http://www.scons.org/
Or through the download link at the SCons project page at SourceForge:
- http://sourceforge.net/projects/scons/
+ http://sourceforge.net/projects/scons/
RPM and Debian packages and a Win32 installer are all available, in
addition to the traditional .tar.gz and .zip files.
@@ -553,13 +640,13 @@ Distinctive features of SCons include:
An scons-users mailing list is available for those interested in getting
started using SCons. You can subscribe at:
- http://lists.sourceforge.net/lists/listinfo/scons-users
+ http://lists.sourceforge.net/lists/listinfo/scons-users
Alternatively, we invite you to subscribe to the low-volume
scons-announce mailing list to receive notification when new versions of
SCons become available:
- http://lists.sourceforge.net/lists/listinfo/scons-announce
+ http://lists.sourceforge.net/lists/listinfo/scons-announce
ACKNOWLEDGEMENTS
@@ -569,4 +656,4 @@ release.
On behalf of the SCons team,
- --SK
+ --SK
View
132 HOWTO/subrelease.txt
@@ -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
13 QMTest/SConscript
@@ -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
43 QMTest/TestCmd.py
@@ -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
4 QMTest/TestCommon.py
@@ -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
74 QMTest/TestRuntest.py
@@ -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)
View
72 QMTest/TestSCons.py
@@ -24,6 +24,14 @@
from TestCommon import *
from TestCommon import __all__
+# Some tests which verify that SCons has been packaged properly need to
+# look for specific version file names. Replicating the version number
+# here provides independent verification that what we packaged conforms
+# to what we expect. (If we derived the version number from the same
+# data driving the build we might miss errors if the logic breaks.)
+
+SConsVersion = '0.96.96'
+
__all__.extend([ 'TestSCons',
'python',
'_exe',
@@ -36,6 +44,7 @@
])
python = python_executable
+_python_ = '"' + python_executable + '"'
_exe = exe_suffix
_obj = obj_suffix
_shobj = shobj_suffix
@@ -105,6 +114,8 @@ class TestSCons(TestCommon):
initializations.
"""
+ scons_version = SConsVersion
+
def __init__(self, **kw):
"""Initialize an SCons testing object.
@@ -292,6 +303,28 @@ def diff_substr(self, expect, actual):
i = i + 1
return "Actual matched the expected output???"
+ def python_file_line(self, file, line):
+ """
+ Returns a Python error line for output comparisons.
+
+ The exec of the traceback line gives us the correct format for
+ this version of Python. Before 2.5, this yielded:
+
+ File "<string>", line 1, ?
+
+ Python 2.5 changed this to:
+
+ File "<string>", line 1, <module>
+
+ We stick the requested file name and line number in the right
+ places, abstracting out the version difference.
+ """
+ exec 'import traceback; x = traceback.format_stack()[-1]'
+ x = string.lstrip(x)
+ x = string.replace(x, '<string>', file)
+ x = string.replace(x, 'line 1,', 'line %s,' % line)
+ return x
+
def java_ENV(self):
"""
Return a default external environment that uses a local Java SDK
@@ -398,20 +431,21 @@ def Qt_dummy_installation(self, dir='qt'):
}
""")
- self.write(['qt', 'lib', 'SConstruct'], r"""
+ self.write([dir, 'lib', 'SConstruct'], r"""
env = Environment()
-env.StaticLibrary( 'myqt', 'my_qobject.cpp' )
+env.SharedLibrary( 'myqt', 'my_qobject.cpp' )
""")
- self.run(chdir = self.workpath('qt', 'lib'),
+ self.run(chdir = self.workpath(dir, 'lib'),
arguments = '.',
stderr = noisy_ar,
match = self.match_re_dotall)
self.QT = self.workpath(dir)
self.QT_LIB = 'myqt'
- self.QT_MOC = '%s %s' % (python, self.workpath(dir, 'bin', 'mymoc.py'))
- self.QT_UIC = '%s %s' % (python, self.workpath(dir, 'bin', 'myuic.py'))
+ self.QT_MOC = '%s %s' % (_python_, self.workpath(dir, 'bin', 'mymoc.py'))
+ self.QT_UIC = '%s %s' % (_python_, self.workpath(dir, 'bin', 'myuic.py'))
+ self.QT_LIB_DIR = self.workpath(dir, 'lib')
def Qt_create_SConstruct(self, place):
if type(place) is type([]):
@@ -516,15 +550,31 @@ def get_msvs_executable(self, version):
"""Returns a full path to the executable (MSDEV or devenv)
for the specified version of Visual Studio.
"""
- sub_path = {
- '6.0' : ['Common', 'MSDev98', 'Bin', 'MSDEV.COM'],
- '7.0' : ['Common7', 'IDE', 'devenv.com'],
- '7.1' : ['Common7', 'IDE', 'devenv.com'],
- '8.0' : ['Common7', 'IDE', 'devenv.com'],
+ common_msdev98_bin_msdev_com = ['Common', 'MSDev98', 'Bin', 'MSDEV.COM']
+ common7_ide_devenv_com = ['Common7', 'IDE', 'devenv.com']
+ common7_ide_vcexpress_exe = ['Common7', 'IDE', 'VCExpress.exe']
+ sub_paths = {
+ '6.0' : [
+ common_msdev98_bin_msdev_com,
+ ],
+ '7.0' : [
+ common7_ide_devenv_com,
+ ],
+ '7.1' : [
+ common7_ide_devenv_com,
+ ],
+ '8.0' : [
+ common7_ide_devenv_com,
+ common7_ide_vcexpress_exe,
+ ],
}
from SCons.Tool.msvs import get_msvs_install_dirs
vs_path = get_msvs_install_dirs(version)['VSINSTALLDIR']
- return apply(os.path.join, [vs_path] + sub_path[version])
+ for sp in sub_paths[version]:
+ p = apply(os.path.join, [vs_path] + sp)
+ if os.path.exists(p):
+ return p
+ return apply(os.path.join, [vs_path] + sub_paths[version][0])
# In some environments, $AR will generate a warning message to stderr
# if the library doesn't previously exist and is being created. One
View
365 QMTest/TestSCons_time.py
@@ -0,0 +1,365 @@
+"""
+TestSCons_time.py: a testing framework for the scons-test.py script
+
+A TestSCons_time environment object is created via the usual invocation:
+
+ test = TestSCons_time()
+
+TestSCons_time is a subclass of TestCommon, which is in turn is a subclass
+of TestCmd), and hence has available all of the methods and attributes
+from those classes, as well as any overridden or additional methods or
+attributes defined in this subclass.
+"""
+
+# __COPYRIGHT__
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+import os
+import os.path
+import string
+import sys
+
+from TestCommon import *
+from TestCommon import __all__
+
+__all__.extend([ 'TestSCons',
+ 'python',
+ '_exe',
+ '_obj',
+ '_shobj',
+ 'lib_',
+ '_lib',
+ 'dll_',
+ '_dll'
+ ])
+
+python = python_executable
+_python_ = '"' + python_executable + '"'
+
+SConstruct = """\
+import os
+print "SConstruct file directory:", os.getcwd()
+"""
+
+scons_py = """\
+#!/usr/bin/env python
+import os
+import sys
+def write_args(fp, args):
+ fp.write(args[0] + '\\n')
+ for arg in args[1:]:
+ fp.write(' ' + arg + '\\n')
+write_args(sys.stdout, sys.argv)
+for arg in sys.argv[1:]:
+ if arg[:10] == '--profile=':
+ profile = open(arg[10:], 'wb')
+ profile.write('--profile\\n')
+ write_args(profile, sys.argv)
+ break
+sys.stdout.write('SCONS_LIB_DIR = ' + os.environ['SCONS_LIB_DIR'] + '\\n')
+execfile('SConstruct')
+"""
+
+aegis_py = """\
+#!/usr/bin/env python
+import os
+import sys
+script_dir = 'src/script'
+if not os.path.exists(script_dir):
+ os.makedirs(script_dir)
+open(script_dir + '/scons.py', 'w').write(
+r'''%s''')
+""" % scons_py
+
+
+svn_py = """\
+#!/usr/bin/env python
+import os
+import sys
+dir = sys.argv[-1]
+script_dir = dir + '/src/script'
+os.makedirs(script_dir)
+open(script_dir + '/scons.py', 'w').write(
+r'''%s''')
+""" % scons_py
+
+
+logfile_contents = """\
+Memory before reading SConscript files: 100%(index)s
+Memory after reading SConscript files: 200%(index)s
+Memory before building targets: 300%(index)s
+Memory after building targets: 400%(index)s
+Object counts:
+ pre- post- pre- post-
+ read read build build Class
+ 101%(index)s 102%(index)s 103%(index)s 104%(index)s Action.CommandAction
+ 201%(index)s 202%(index)s 203%(index)s 204%(index)s Action.CommandGeneratorAction
+ 301%(index)s 302%(index)s 303%(index)s 304%(index)s Action.FunctionAction
+ 401%(index)s 402%(index)s 403%(index)s 404%(index)s Action.LazyAction
+ 501%(index)s 502%(index)s 503%(index)s 504%(index)s Action.ListAction
+ 601%(index)s 602%(index)s 603%(index)s 604%(index)s Builder.BuilderBase
+ 701%(index)s 702%(index)s 703%(index)s 704%(index)s Builder.CompositeBuilder
+ 801%(index)s 802%(index)s 803%(index)s 804%(index)s Builder.ListBuilder
+ 901%(index)s 902%(index)s 903%(index)s 904%(index)s Builder.MultiStepBuilder
+ 1001%(index)s 1002%(index)s 1003%(index)s 1004%(index)s Builder.OverrideWarner
+ 1101%(index)s 1102%(index)s 1103%(index)s 1104%(index)s Environment.Base
+ 1201%(index)s 1202%(index)s 1203%(index)s 1204%(index)s Environment.EnvironmentClone
+ 1301%(index)s 1302%(index)s 1303%(index)s 1304%(index)s Environment.OverrideEnvironment
+ 1401%(index)s 1402%(index)s 1403%(index)s 1404%(index)s Executor.Executor
+ 1501%(index)s 1502%(index)s 1503%(index)s 1504%(index)s Node.FS
+ 1601%(index)s 1602%(index)s 1603%(index)s 1604%(index)s Node.FS.Base
+ 1701%(index)s 1702%(index)s 1703%(index)s 1704%(index)s Node.FS.Dir
+ 1801%(index)s 1802%(index)s 1803%(index)s 1804%(index)s Node.FS.File
+ 1901%(index)s 1902%(index)s 1904%(index)s 1904%(index)s Node.FS.RootDir
+ 2001%(index)s 2002%(index)s 2003%(index)s 2004%(index)s Node.Node
+Total build time: 11.123456 seconds
+Total SConscript file execution time: 22.234567 seconds
+Total SCons execution time: 33.345678 seconds
+Total command execution time: 44.456789 seconds
+"""
+
+
+profile_py = """\
+%(body)s
+
+import profile
+
+try: dispatch = profile.Profile.dispatch
+except AttributeError: pass
+else: dispatch['c_exception'] = profile.Profile.trace_dispatch_return
+
+prof = profile.Profile()
+prof.runcall(%(call)s)
+prof.dump_stats(r'%(profile_name)s')
+"""
+
+
+class TestSCons_time(TestCommon):
+ """Class for testing the scons-time script.
+
+ This provides a common place for initializing scons-time tests,
+ eliminating the need to begin every test with the same repeated
+ initializations.
+ """
+
+ def __init__(self, **kw):
+ """Initialize an SCons_time testing object.
+
+ If they're not overridden by keyword arguments, this
+ initializes the object with the following default values:
+
+ program = 'scons-time'
+ interpreter = ['python', '-tt']
+ match = match_exact
+ workdir = ''
+
+ The workdir value means that, by default, a temporary workspace
+ directory is created for a TestSCons_time environment.
+ In addition, this method changes directory (chdir) to the
+ workspace directory, so an explicit "chdir = '.'" on all of the
+ run() method calls is not necessary.
+ """
+
+ self.orig_cwd = os.getcwd()
+ try:
+ script_dir = os.environ['SCONS_SCRIPT_DIR']
+ except KeyError:
+ pass
+ else:
+ os.chdir(script_dir)
+ if not kw.has_key('program'):
+ p = os.environ.get('SCONS_TIME')
+ if not p:
+ p = 'scons-time'
+ if not os.path.exists(p):
+ p = 'scons-time.py'
+ kw['program'] = p
+
+ if not kw.has_key('interpreter'):
+ kw['interpreter'] = [python, '-tt']
+
+ if not kw.has_key('match'):
+ kw['match'] = match_exact
+
+ if not kw.has_key('workdir'):
+ kw['workdir'] = ''
+
+ apply(TestCommon.__init__, [self], kw)
+
+ try:
+ eval('[x for x in [1, 2]]')
+ except SyntaxError:
+ version = string.split(sys.version)[0]
+ msg = 'scons-time does not work on Python version %s\n' % version
+ self.skip_test(msg)
+
+ def archive_split(self, path):
+ if path[-7:] == '.tar.gz':
+ return path[:-7], path[-7:]
+ else:
+ return os.path.splitext(path)
+
+ def must_contain_all_lines(self, name, content, expected, exists=None):
+ missing_lines = []
+
+ if exists is None:
+ exists = lambda e, c: string.find(c, e) != -1
+
+ for e in expected:
+ if not exists(e, content):
+ missing_lines.append(e)
+
+ if missing_lines:
+ sys.stdout.write('%s is missing expected string(s):\n' % name)
+ for m in missing_lines:
+ sys.stdout.write(' ' + repr(m) + '\n')
+ sys.stdout.write('%s content:\n' % name)
+ sys.stdout.write(content)
+ self.fail_test()
+
+ def fake_logfile(self, logfile_name, index=0):
+ self.write(self.workpath(logfile_name), logfile_contents % locals())
+
+ def profile_data(self, profile_name, python_name, call, body):
+ profile_name = self.workpath(profile_name)
+ python_name = self.workpath(python_name)
+ d = {
+ 'profile_name' : profile_name,
+ 'python_name' : python_name,
+ 'call' : call,
+ 'body' : body,
+ }
+ self.write(python_name, profile_py % d)
+ self.run(program = python_name, interpreter = sys.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_aegis_py(self, name):
+ name = self.workpath(name)
+ self.write(name, aegis_py)
+ os.chmod(name, 0755)
+ return name
+
+ def write_fake_scons_py(self):
+ self.subdir('src', ['src', 'script'])
+ self.write('src/script/scons.py', scons_py)
+
+ def write_fake_svn_py(self, name):
+ name = self.workpath(name)
+ self.write(name, svn_py)
+ os.chmod(name, 0755)
+ return name
+
+ def write_sample_directory(self, archive, dir, files):
+ dir = self.workpath(dir)
+ for name, content in files:
+ path = os.path.join(dir, name)
+ d, f = os.path.split(path)
+ if not os.path.isdir(d):
+ os.makedirs(d)
+ open(path, 'wb').write(content)
+ return dir
+
+ def write_sample_tarfile(self, archive, dir, files):
+ import shutil
+ try:
+ import tarfile
+
+ except ImportError:
+
+ self.skip_test('no tarfile module\n')
+
+ else:
+
+ base, suffix = self.archive_split(archive)
+
+ mode = {
+ '.tar' : 'w',
+ '.tar.gz' : 'w:gz',
+ '.tgz' : 'w:gz',
+ }
+
+ tar = tarfile.open(archive, mode[suffix])
+ for name, content in files:
+ path = os.path.join(dir, name)
+ open(path, 'wb').write(content)
+ tarinfo = tar.gettarinfo(path, path)
+ tarinfo.uid = 111
+ tarinfo.gid = 111
+ tarinfo.uname = 'fake_user'
+ tarinfo.gname = 'fake_group'
+ tar.addfile(tarinfo, open(path, 'rb'))
+ tar.close()
+ shutil.rmtree(dir)
+ return self.workpath(archive)
+
+ def write_sample_zipfile(self, archive, dir, files):
+ import shutil
+ try:
+ import zipfile
+ except ImportError:
+
+ sys.stderr.write('no zipfile module\n')
+ self.no_result()
+
+ else:
+
+ zip = zipfile.ZipFile(archive, 'w')
+ for name, content in files:
+ path = os.path.join(dir, name)
+ open(path, 'wb').write(content)
+ zip.write(path)
+ zip.close()
+ shutil.rmtree(dir)
+ return self.workpath(archive)
+
+ sample_project_files = [
+ ('SConstruct', SConstruct),
+ ]
+
+ def write_sample_project(self, archive, dir=None):
+ base, suffix = self.archive_split(archive)
+
+ write_sample = {
+ '.tar' : self.write_sample_tarfile,
+ '.tar.gz' : self.write_sample_tarfile,
+ '.tgz' : self.write_sample_tarfile,
+ '.zip' : self.write_sample_zipfile,
+ }.get(suffix, self.write_sample_directory)
+
+ if not dir:
+ dir = base
+
+ os.mkdir(dir)
+ path = write_sample(archive, dir, self.sample_project_files)
+
+ return path
View
74 QMTest/TestSConsign.py
@@ -0,0 +1,74 @@
+# __COPYRIGHT__
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+__doc__ = """
+TestSConsign.py: a testing framework for the "sconsign" script
+tool.
+
+A TestSConsign environment object is created via the usual invocation:
+
+ test = TestSConsign()
+
+TestSconsign is a subclass of TestSCons, which is a subclass of
+TestCommon, which is in turn is a subclass of TestCmd), and hence
+has available all of the methods and attributes from those classes,
+as well as any overridden or additional methods or attributes defined
+in this subclass.
+"""
+
+import os
+import os.path
+import string
+import sys
+
+from TestSCons import *
+from TestSCons import __all__
+
+__all__.extend([ 'TestSConsign', ])
+
+class TestSConsign(TestSCons):
+ """Class for testing the sconsign.py script.
+
+ This provides a common place for initializing sconsign tests,
+ eliminating the need to begin every test with the same repeated
+ initializations.
+
+ This adds additional methods for running the sconsign script
+ without changing the basic ability of the run() method to run
+ "scons" itself, since we need to run scons to generate the
+ .sconsign files that we want the sconsign script to read.
+ """
+ def __init__(self, *args, **kw):
+ try:
+ script_dir = os.environ['SCONS_SCRIPT_DIR']
+ except KeyError:
+ pass
+ else:
+ os.chdir(script_dir)
+ self.script_dir = os.getcwd()
+
+ apply(TestSCons.__init__, (self,)+args, kw)
+
+ self.my_kw = {
+ 'interpreter' : python, # imported from TestSCons
+ }
+
+ if os.path.exists(self.script_path('sconsign.py')):
+ sconsign = 'sconsign.py'
+ elif os.path.exists(self.script_path('sconsign')):
+ sconsign = 'sconsign'
+ else:
+ print "Can find neither 'sconsign.py' nor 'sconsign' scripts."
+ self.no_result()
+ self.set_sconsign(sconsign)
+
+ def script_path(self, script):
+ return os.path.join(self.script_dir, script)
+
+ def set_sconsign(self, sconsign):
+ self.my_kw['program'] = sconsign
+
+ def run_sconsign(self, *args, **kw):
+ kw.update(self.my_kw)
+ return apply(self.run, args, kw)
View
1  QMTest/classes.qmc
@@ -8,4 +8,5 @@
<class kind="result_stream" name="scons_tdb.AegisChangeStream"/>
<class kind="result_stream" name="scons_tdb.AegisBaselineStream"/>
<class kind="result_stream" name="scons_tdb.AegisBatchStream"/>
+ <class kind="result_stream" name="scons_tdb.SConsXMLResultStream"/>
</class-directory>
View
219 QMTest/scons_tdb.py
@@ -46,9 +46,13 @@
from qm.test.result import Result
from qm.test.file_result_stream import FileResultStream
from qm.test.classes.text_result_stream import TextResultStream
+from qm.test.classes.xml_result_stream import XMLResultStream
from qm.test.directory_suite import DirectorySuite
from qm.extension import get_extension_class_name, get_class_arguments_as_dictionary
-import os, dircache
+
+import dircache
+import os
+import imp
if sys.platform == 'win32':
console = 'con'
@@ -128,62 +132,145 @@ def check_exit_status(result, prefix, desc, status):
return True
-# XXX I'd like to annotate the overall test run with the following
-# information about the Python version, SCons version, and environment.
-# Not sure how to do that yet; ask Stefan.
-#
-# sys_keys = ['byteorder', 'exec_prefix', 'executable', 'maxint', 'maxunicode', 'platform', 'prefix', 'version', 'version_info']
-
-# " <%s>" % tag
-# " <version>%s</version>" % module.__version__
-# " <build>%s</build>" % module.__build__
-# " <buildsys>%s</buildsys>" % module.__buildsys__
-# " <date>%s</date>" % module.__date__
-# " <developer>%s</developer>" % module.__developer__
-# " </%s>" % tag
-
-# " <scons>"
-# print_version_info("script", scons)
-# print_version_info("engine", SCons)
-# " </scons>"
-
-# environ_keys = [
-# 'PATH',
-# 'SCONSFLAGS',
-# 'SCONS_LIB_DIR',
-# 'PYTHON_ROOT',
-# 'QTDIR',
-#
-# 'COMSPEC',
-# 'INTEL_LICENSE_FILE',
-# 'INCLUDE',
-# 'LIB',
-# 'MSDEVDIR',
-# 'OS',
-# 'PATHEXT',
-# 'SYSTEMROOT',
-# 'TEMP',
-# 'TMP',
-# 'USERNAME',
-# 'VXDOMNTOOLS',
-# 'WINDIR',
-# 'XYZZY'
-#
-# 'ENV',
-# 'HOME',
-# 'LANG',
-# 'LANGUAGE',
-# 'LOGNAME',
-# 'MACHINE',
-# 'OLDPWD',
-# 'PWD',
-# 'OPSYS',
-# 'SHELL',
-# 'TMPDIR',
-# 'USER',
-# ]
+
+
+class Null:
+ pass
+
+_null = Null()
+
+sys_attributes = [
+ 'byteorder',
+ 'exec_prefix',
+ 'executable',
+ 'maxint',
+ 'maxunicode',
+ 'platform',
+ 'prefix',
+ 'version',
+ 'version_info',
+]
+
+def get_sys_values():
+ sys_attributes.sort()
+ result = map(lambda k: (k, getattr(sys, k, _null)), sys_attributes)
+ result = filter(lambda t: not t[1] is _null, result)
+ result = map(lambda t: t[0] + '=' + repr(t[1]), result)
+ return string.join(result, '\n ')
+
+module_attributes = [
+ '__version__',
+ '__build__',
+ '__buildsys__',
+ '__date__',
+ '__developer__',
+]
+
+def get_module_info(module):
+ module_attributes.sort()
+ result = map(lambda k: (k, getattr(module, k, _null)), module_attributes)
+ result = filter(lambda t: not t[1] is _null, result)
+ result = map(lambda t: t[0] + '=' + repr(t[1]), result)
+ return string.join(result, '\n ')
+
+environ_keys = [
+ 'PATH',
+ 'SCONS',
+ 'SCONSFLAGS',
+ 'SCONS_LIB_DIR',
+ 'PYTHON_ROOT',
+ 'QTDIR',
+
+ 'COMSPEC',
+ 'INTEL_LICENSE_FILE',
+ 'INCLUDE',
+ 'LIB',
+ 'MSDEVDIR',
+ 'OS',
+ 'PATHEXT',
+ 'SYSTEMROOT',
+ 'TEMP',
+ 'TMP',
+ 'USERNAME',
+ 'VXDOMNTOOLS',
+ 'WINDIR',
+ 'XYZZY'
+
+ 'ENV',
+ 'HOME',
+ 'LANG',
+ 'LANGUAGE',
+ 'LC_ALL',
+ 'LC_MESSAGES',
+ 'LOGNAME',
+ 'MACHINE',
+ 'OLDPWD',
+ 'PWD',
+ 'OPSYS',
+ 'SHELL',
+ 'TMPDIR',
+ 'USER',
+]
+
+def get_environment():
+ environ_keys.sort()
+ result = map(lambda k: (k, os.environ.get(k, _null)), environ_keys)
+ result = filter(lambda t: not t[1] is _null, result)
+ result = map(lambda