Show More
@@ -23,7 +23,7 name = 'ipython' | |||
|
23 | 23 | development = True # change this to False to do a release |
|
24 | 24 | version_base = '0.11' |
|
25 | 25 | branch = 'ipython' |
|
26 |
revision = '134 |
|
|
26 | revision = '1346' | |
|
27 | 27 | |
|
28 | 28 | if development: |
|
29 | 29 | if branch == 'ipython': |
@@ -23,6 +23,7 will change in the future. | |||
|
23 | 23 | # Stdlib |
|
24 | 24 | import os |
|
25 | 25 | import os.path as path |
|
26 | import platform | |
|
26 | 27 | import signal |
|
27 | 28 | import sys |
|
28 | 29 | import subprocess |
@@ -49,6 +50,7 import nose.plugins.builtin | |||
|
49 | 50 | from nose.core import TestProgram |
|
50 | 51 | |
|
51 | 52 | # Our own imports |
|
53 | from IPython.core import release | |
|
52 | 54 | from IPython.utils import genutils |
|
53 | 55 | from IPython.utils.platutils import find_cmd, FindCmdError |
|
54 | 56 | from IPython.testing import globalipapp |
@@ -100,21 +102,54 def test_for(mod): | |||
|
100 | 102 | else: |
|
101 | 103 | return True |
|
102 | 104 | |
|
103 | have_curses = test_for('_curses') | |
|
104 | have_wx = test_for('wx') | |
|
105 | have_wx_aui = test_for('wx.aui') | |
|
106 | have_zi = test_for('zope.interface') | |
|
107 |
have |
|
|
108 |
have |
|
|
109 |
have |
|
|
110 |
have |
|
|
111 |
have |
|
|
112 |
have |
|
|
105 | # Global dict where we can store information on what we have and what we don't | |
|
106 | # have available at test run time | |
|
107 | have = {} | |
|
108 | ||
|
109 | have['curses'] = test_for('_curses') | |
|
110 | have['wx'] = test_for('wx') | |
|
111 | have['wx.aui'] = test_for('wx.aui') | |
|
112 | have['zope.interface'] = test_for('zope.interface') | |
|
113 | have['twisted'] = test_for('twisted') | |
|
114 | have['foolscap'] = test_for('foolscap') | |
|
115 | have['objc'] = test_for('objc') | |
|
116 | have['pexpect'] = test_for('pexpect') | |
|
117 | have['gtk'] = test_for('gtk') | |
|
118 | have['gobject'] = test_for('gobject') | |
|
113 | 119 | |
|
114 | 120 | #----------------------------------------------------------------------------- |
|
115 | 121 | # Functions and classes |
|
116 | 122 | #----------------------------------------------------------------------------- |
|
117 | 123 | |
|
124 | def report(): | |
|
125 | """Return a string with a summary report of test-related variables.""" | |
|
126 | ||
|
127 | out = [ genutils.sys_info() ] | |
|
128 | ||
|
129 | out.append('\nRunning from an installed IPython: %s\n' % INSTALLED) | |
|
130 | ||
|
131 | avail = [] | |
|
132 | not_avail = [] | |
|
133 | ||
|
134 | for k, is_avail in have.items(): | |
|
135 | if is_avail: | |
|
136 | avail.append(k) | |
|
137 | else: | |
|
138 | not_avail.append(k) | |
|
139 | ||
|
140 | if avail: | |
|
141 | out.append('\nTools and libraries available at test time:\n') | |
|
142 | avail.sort() | |
|
143 | out.append(' ' + ' '.join(avail)+'\n') | |
|
144 | ||
|
145 | if not_avail: | |
|
146 | out.append('\nTools and libraries NOT available at test time:\n') | |
|
147 | not_avail.sort() | |
|
148 | out.append(' ' + ' '.join(not_avail)+'\n') | |
|
149 | ||
|
150 | return ''.join(out) | |
|
151 | ||
|
152 | ||
|
118 | 153 | def make_exclude(): |
|
119 | 154 | """Make patterns of modules and packages to exclude from testing. |
|
120 | 155 | |
@@ -149,18 +184,18 def make_exclude(): | |||
|
149 | 184 | ipjoin('config', 'profile'), |
|
150 | 185 | ] |
|
151 | 186 | |
|
152 |
if not have |
|
|
187 | if not have['wx']: | |
|
153 | 188 | exclusions.append(ipjoin('gui')) |
|
154 | 189 | exclusions.append(ipjoin('frontend', 'wx')) |
|
155 | 190 | exclusions.append(ipjoin('lib', 'inputhookwx')) |
|
156 | 191 | |
|
157 |
if not have |
|
|
192 | if not have['gtk'] or not have['gobject']: | |
|
158 | 193 | exclusions.append(ipjoin('lib', 'inputhookgtk')) |
|
159 | 194 | |
|
160 |
if not have |
|
|
195 | if not have['wx.aui']: | |
|
161 | 196 | exclusions.append(ipjoin('gui', 'wx', 'wxIPython')) |
|
162 | 197 | |
|
163 |
if not have |
|
|
198 | if not have['objc']: | |
|
164 | 199 | exclusions.append(ipjoin('frontend', 'cocoa')) |
|
165 | 200 | |
|
166 | 201 | if not sys.platform == 'win32': |
@@ -175,14 +210,14 def make_exclude(): | |||
|
175 | 210 | if not os.name == 'posix': |
|
176 | 211 | exclusions.append(ipjoin('utils', 'platutils_posix')) |
|
177 | 212 | |
|
178 |
if not have |
|
|
213 | if not have['pexpect']: | |
|
179 | 214 | exclusions.extend([ipjoin('scripts', 'irunner'), |
|
180 | 215 | ipjoin('lib', 'irunner')]) |
|
181 | 216 | |
|
182 | 217 | # This is scary. We still have things in frontend and testing that |
|
183 | 218 | # are being tested by nose that use twisted. We need to rethink |
|
184 | 219 | # how we are isolating dependencies in testing. |
|
185 |
if not (have |
|
|
220 | if not (have['twisted'] and have['zope.interface'] and have['foolscap']): | |
|
186 | 221 | exclusions.extend( |
|
187 | 222 | [ipjoin('frontend', 'asyncfrontendbase'), |
|
188 | 223 | ipjoin('frontend', 'prefilterfrontend'), |
@@ -303,11 +338,11 def make_runners(): | |||
|
303 | 338 | # The machinery in kernel needs twisted for real testing |
|
304 | 339 | trial_pkg_names = [] |
|
305 | 340 | |
|
306 |
if have |
|
|
341 | if have['wx']: | |
|
307 | 342 | nose_pkg_names.append('gui') |
|
308 | 343 | |
|
309 | 344 | # And add twisted ones if conditions are met |
|
310 |
if have |
|
|
345 | if have['zope.interface'] and have['twisted'] and have['foolscap']: | |
|
311 | 346 | # Note that we list the kernel here, though the bulk of it is |
|
312 | 347 | # twisted-based, because nose picks up doctests that twisted doesn't. |
|
313 | 348 | nose_pkg_names.append('kernel') |
@@ -420,8 +455,11 def run_iptestall(): | |||
|
420 | 455 | # summarize results |
|
421 | 456 | |
|
422 | 457 | print '*'*70 |
|
458 | print 'Test suite completed for system with the following information:' | |
|
459 | print report() | |
|
423 | 460 | print 'Ran %s test groups in %.3fs' % (nrunners, t_tests) |
|
424 | 461 | |
|
462 | print 'Status:' | |
|
425 | 463 | if not failed: |
|
426 | 464 | print 'OK' |
|
427 | 465 | else: |
@@ -82,10 +82,26 Regardless of how you run things, you should eventually see something like: | |||
|
82 | 82 | .. code-block:: bash |
|
83 | 83 | |
|
84 | 84 | ********************************************************************** |
|
85 | Ran 11 test groups in 64.117s | |
|
85 | Test suite completed for system with the following information: | |
|
86 | IPython version: 0.11.bzr.r1340 | |
|
87 | BZR revision : 1340 | |
|
88 | Platform info : os.name -> posix, sys.platform -> linux2 | |
|
89 | : Linux-2.6.31-17-generic-i686-with-Ubuntu-9.10-karmic | |
|
90 | Python info : 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) | |
|
91 | [GCC 4.4.1] | |
|
86 | 92 | |
|
87 | OK | |
|
93 | Running from an installed IPython: True | |
|
94 | ||
|
95 | Tools and libraries available at test time: | |
|
96 | curses foolscap gobject gtk pexpect twisted wx wx.aui zope.interface | |
|
97 | ||
|
98 | Tools and libraries NOT available at test time: | |
|
99 | objc | |
|
88 | 100 | |
|
101 | Ran 11 test groups in 36.244s | |
|
102 | ||
|
103 | Status: | |
|
104 | OK | |
|
89 | 105 | |
|
90 | 106 | If not, there will be a message indicating which test group failed and how to |
|
91 | 107 | rerun that group individually. For example, this tests the |
General Comments 0
You need to be logged in to leave comments.
Login now